rad sensor debug flag
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit

This commit is contained in:
Robin Müller 2022-03-30 18:11:21 +02:00
parent 53aca633b8
commit d01d6d92f8
4 changed files with 25 additions and 6 deletions

View File

@ -91,6 +91,16 @@ ReturnValue_t RadiationSensorHandler::buildCommandFromCommand(DeviceCommandId_t
rawPacketLen = RAD_SENSOR::READ_SIZE; rawPacketLen = RAD_SENSOR::READ_SIZE;
return RETURN_OK; return RETURN_OK;
} }
case RAD_SENSOR::ENABLE_DEBUG_OUTPUT: {
printPeriodicData = true;
rawPacketLen = 0;
return RETURN_OK;
}
case RAD_SENSOR::DISABLE_DEBUG_OUTPUT: {
rawPacketLen = 0;
printPeriodicData = false;
return RETURN_OK;
}
default: default:
return DeviceHandlerIF::COMMAND_NOT_IMPLEMENTED; return DeviceHandlerIF::COMMAND_NOT_IMPLEMENTED;
} }
@ -100,6 +110,8 @@ ReturnValue_t RadiationSensorHandler::buildCommandFromCommand(DeviceCommandId_t
void RadiationSensorHandler::fillCommandAndReplyMap() { void RadiationSensorHandler::fillCommandAndReplyMap() {
this->insertInCommandMap(RAD_SENSOR::WRITE_SETUP); this->insertInCommandMap(RAD_SENSOR::WRITE_SETUP);
this->insertInCommandMap(RAD_SENSOR::START_CONVERSION); this->insertInCommandMap(RAD_SENSOR::START_CONVERSION);
this->insertInCommandMap(RAD_SENSOR::ENABLE_DEBUG_OUTPUT);
this->insertInCommandMap(RAD_SENSOR::DISABLE_DEBUG_OUTPUT);
this->insertInCommandAndReplyMap(RAD_SENSOR::READ_CONVERSIONS, 1, &dataset, this->insertInCommandAndReplyMap(RAD_SENSOR::READ_CONVERSIONS, 1, &dataset,
RAD_SENSOR::READ_SIZE); RAD_SENSOR::READ_SIZE);
} }
@ -111,18 +123,23 @@ ReturnValue_t RadiationSensorHandler::scanForReply(const uint8_t *start, size_t
switch (*foundId) { switch (*foundId) {
case RAD_SENSOR::START_CONVERSION: case RAD_SENSOR::START_CONVERSION:
case RAD_SENSOR::WRITE_SETUP: case RAD_SENSOR::WRITE_SETUP:
*foundLen = remainingSize;
return IGNORE_REPLY_DATA; return IGNORE_REPLY_DATA;
case RAD_SENSOR::READ_CONVERSIONS: { case RAD_SENSOR::READ_CONVERSIONS: {
ReturnValue_t result = gpioIF->pullLow(gpioIds::ENABLE_RADFET); ReturnValue_t result = gpioIF->pullLow(gpioIds::ENABLE_RADFET);
if (result != HasReturnvaluesIF::RETURN_OK) { if (result != HasReturnvaluesIF::RETURN_OK) {
#if OBSW_VERBOSE_LEVEL >= 1 #if OBSW_VERBOSE_LEVEL >= 1
sif::warning << "RadiationSensorHandler::buildCommandFromCommand; Pulling RADFET Enale pin " sif::warning << "RadiationSensorHandler::scanForReply; Pulling RADFET Enale pin "
"low failed" "low failed"
<< std::endl; << std::endl;
#endif #endif
} }
break; break;
} }
case RAD_SENSOR::ENABLE_DEBUG_OUTPUT:
case RAD_SENSOR::DISABLE_DEBUG_OUTPUT:
sif::info << "RadiationSensorHandler::scanForReply: " << remainingSize << std::endl;
break;
default: default:
break; break;
} }

View File

@ -9,9 +9,11 @@ static const DeviceCommandId_t NONE = 0x0; // Set when no command is pending
* This command initiates the ADC conversion for all channels including the internal * This command initiates the ADC conversion for all channels including the internal
* temperature sensor. * temperature sensor.
*/ */
static const DeviceCommandId_t WRITE_SETUP = 0x1; static const DeviceCommandId_t WRITE_SETUP = 1;
static const DeviceCommandId_t START_CONVERSION = 0x2; static const DeviceCommandId_t START_CONVERSION = 2;
static const DeviceCommandId_t READ_CONVERSIONS = 0x3; static const DeviceCommandId_t READ_CONVERSIONS = 3;
static const DeviceCommandId_t ENABLE_DEBUG_OUTPUT = 4;
static const DeviceCommandId_t DISABLE_DEBUG_OUTPUT = 5;
/** /**
* @brief This is the configuration byte which will be written to the setup register after * @brief This is the configuration byte which will be written to the setup register after

View File

@ -313,7 +313,7 @@ void CCSDSHandler::enableTransmit() {
return; return;
} }
transmitterCountdown.setTimeout(TRANSMITTER_TIMEOUT); transmitterCountdown.setTimeout(TRANSMITTER_TIMEOUT);
#ifdef TE0720_1CFA #ifndef TE0720_1CFA
gpioIF->pullHigh(enTxClock); gpioIF->pullHigh(enTxClock);
gpioIF->pullHigh(enTxData); gpioIF->pullHigh(enTxData);
#endif /* BOARD_TE0720 == 0 */ #endif /* BOARD_TE0720 == 0 */

2
tmtc

@ -1 +1 @@
Subproject commit c1a8170945f1cb5ed041175506eb8c1cfcbefc6a Subproject commit eb4dc95160ccf9093b46fa2d48240c69c85226ea