RAD sensor delay after pulling pin high
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good

This commit is contained in:
Robin Müller 2023-07-20 17:12:50 +02:00
parent 2c9df747e8
commit 7cc95be900
Signed by: muellerr
GPG Key ID: A649FB78196E3849

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