From 7cc95be90028e4565e0107b8869d973b501410ed Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 20 Jul 2023 17:12:50 +0200 Subject: [PATCH] RAD sensor delay after pulling pin high --- mission/payload/RadiationSensorHandler.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mission/payload/RadiationSensorHandler.cpp b/mission/payload/RadiationSensorHandler.cpp index 2a87e730..2087ad30 100644 --- a/mission/payload/RadiationSensorHandler.cpp +++ b/mission/payload/RadiationSensorHandler.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -93,6 +94,10 @@ ReturnValue_t RadiationSensorHandler::buildCommandFromCommand(DeviceCommandId_t } case (radSens::START_CONVERSION): { ReturnValue_t result = gpioIF->pullHigh(gpioIds::ENABLE_RADFET); + // Test a small delay between pulling the RADFET high and reading the sensor. As long as this + // delay remains small enough, this should not cause scheduling issues. Do not make this + // delay large, this device might be scheduled inside the ACS PST! + TaskFactory::delayTask(5); if (result != returnvalue::OK) { #if OBSW_VERBOSE_LEVEL >= 1 sif::warning