diff --git a/mission/devices/SyrlinksHkHandler.cpp b/mission/devices/SyrlinksHkHandler.cpp index 73581e4d..15011c55 100644 --- a/mission/devices/SyrlinksHkHandler.cpp +++ b/mission/devices/SyrlinksHkHandler.cpp @@ -88,6 +88,12 @@ ReturnValue_t SyrlinksHkHandler::buildCommandFromCommand(DeviceCommandId_t devic rawPacket = commandBuffer; return RETURN_OK; } + case (SYRLINKS::WRITE_LCL_CONFIG): { + writeLclConfig.copy(reinterpret_cast(commandBuffer), writeLclConfig.size(), 0); + rawPacketLen = writeLclConfig.size(); + rawPacket = commandBuffer; + return RETURN_OK; + } case (SYRLINKS::READ_RX_STATUS_REGISTERS): { readRxStatusRegCommand.copy(reinterpret_cast(commandBuffer), readRxStatusRegCommand.size(), 0); @@ -138,6 +144,8 @@ void SyrlinksHkHandler::fillCommandAndReplyMap() { false, true, SYRLINKS::ACK_REPLY); this->insertInCommandAndReplyMap(SYRLINKS::SET_TX_MODE_CW, 1, nullptr, SYRLINKS::ACK_SIZE, false, true, SYRLINKS::ACK_REPLY); + this->insertInCommandAndReplyMap(SYRLINKS::WRITE_LCL_CONFIG, 2, nullptr, SYRLINKS::ACK_SIZE, false, + true, SYRLINKS::ACK_REPLY); this->insertInCommandAndReplyMap(SYRLINKS::READ_TX_STATUS, 1, &txDataset, SYRLINKS::READ_ONE_REGISTER_REPLY_SIE); this->insertInCommandAndReplyMap(SYRLINKS::READ_TX_WAVEFORM, 1, &txDataset, diff --git a/mission/devices/SyrlinksHkHandler.h b/mission/devices/SyrlinksHkHandler.h index 8f828756..922cf0d1 100644 --- a/mission/devices/SyrlinksHkHandler.h +++ b/mission/devices/SyrlinksHkHandler.h @@ -61,12 +61,14 @@ class SyrlinksHkHandler : public DeviceHandlerBase { static const uint8_t CRC_INITIAL_VALUE = 0x0; + // Uses CRC-16/XMODEM std::string resetCommand = ""; std::string readRxStatusRegCommand = ""; std::string setTxModeStandby = ""; /** W - write, 04 - 4 bytes in data field, 01 - value, 40 register to write value */ std::string setTxModeModulation = ""; std::string setTxModeCw = ""; + std::string writeLclConfig = ""; std::string readTxStatus = ""; std::string readTxWaveform = ""; std::string readTxAgcValueHighByte = ""; diff --git a/mission/devices/devicedefinitions/SyrlinksDefinitions.h b/mission/devices/devicedefinitions/SyrlinksDefinitions.h index 3b56918a..268cb9ea 100644 --- a/mission/devices/devicedefinitions/SyrlinksDefinitions.h +++ b/mission/devices/devicedefinitions/SyrlinksDefinitions.h @@ -18,6 +18,7 @@ static const DeviceCommandId_t READ_TX_STATUS = 0x07; static const DeviceCommandId_t READ_TX_WAVEFORM = 0x08; static const DeviceCommandId_t READ_TX_AGC_VALUE_HIGH_BYTE = 0x09; static const DeviceCommandId_t READ_TX_AGC_VALUE_LOW_BYTE = 0x0A; +static const DeviceCommandId_t WRITE_LCL_CONFIG = 0x0B; /** Size of a simple transmission success response */ static const uint8_t ACK_SIZE = 12; diff --git a/tmtc b/tmtc index 5816f05c..c1a81709 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 5816f05ccf8971f3cf2dd1d603dd3f5a33f6f504 +Subproject commit c1a8170945f1cb5ed041175506eb8c1cfcbefc6a