RAD sensor delay after pulling pin high #751

Merged
muellerr merged 3 commits from rad-sensor-delay-after-gpio into main 2023-07-21 11:50:49 +02:00
Showing only changes of commit 7cc95be900 - Show all commits

View File

@ -1,6 +1,7 @@
#include <OBSWConfig.h>
#include <devices/gpioIds.h>
#include <fsfw/datapool/PoolReadGuard.h>
#include <fsfw/tasks/TaskFactory.h>
#include <mission/payload/RadiationSensorHandler.h>
#include <mission/power/gsDefs.h>
#include <mission/tcs/max1227.h>
@ -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