reading temperature value
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
Jakob Meier
2022-03-31 09:11:01 +02:00
parent 6052363cdb
commit 387595495e
3 changed files with 121 additions and 42 deletions

View File

@ -33,9 +33,6 @@ class SyrlinksHkHandler : public DeviceHandlerBase {
ReturnValue_t buildCommandFromCommand(DeviceCommandId_t deviceCommand, const uint8_t* commandData,
size_t commandDataLen) override;
void fillCommandAndReplyMap() override;
// ReturnValue_t enableReplyInReplyMap(DeviceCommandMap::iterator command,
// uint8_t expectedReplies = 1, bool useAlternateId = false,
// DeviceCommandId_t alternateReplyID = 0) override;
ReturnValue_t scanForReply(const uint8_t* start, size_t remainingSize, DeviceCommandId_t* foundId,
size_t* foundLen) override;
ReturnValue_t interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) override;
@ -74,6 +71,10 @@ class SyrlinksHkHandler : public DeviceHandlerBase {
std::string readTxAgcValueHighByte = "<R02:46:DFF3>";
std::string readTxAgcValueLowByte = "<R02:47:ECC2>";
std::string readLclConfig = "<R02:07:3002>";
std::string tempPowerAmpBoardHighByte = "<R02:C0:28CD>";
std::string tempPowerAmpBoardLowByte = "<R02:C1:1BFC>";
std::string tempBasebandBoardHighByte = "<R02:C2:4EAF>";
std::string tempBasebandBoardLowByte = "<R02:C3:7D9E>";
/**
* In some cases it is not possible to extract from the received reply the information about
@ -86,7 +87,11 @@ class SyrlinksHkHandler : public DeviceHandlerBase {
const power::Switch_t powerSwitch = power::NO_SWITCH;
uint8_t agcValueHighByte;
uint8_t agcValueHighByte = 0;
uint16_t rawTempPowerAmplifier = 0;
uint16_t rawTempBasebandBoard = 0;
float tempPowerAmplifier = 0;
float tempBasebandBoard = 0;
uint8_t commandBuffer[SYRLINKS::MAX_COMMAND_SIZE];
@ -182,6 +187,11 @@ class SyrlinksHkHandler : public DeviceHandlerBase {
*/
void parseAgcLowByte(const uint8_t* packet);
void parseAgcHighByte(const uint8_t* packet);
/**
* @brief Calculates temperature in degree celcius form raw value
*/
float calcTempVal(uint16_t);
};
#endif /* MISSION_DEVICES_SYRLINKSHKHANDLER_H_ */