syrlinks writing lcl register

This commit is contained in:
Robin Müller 2022-03-30 11:25:03 +02:00
parent 9236486a0f
commit 61a7f71e80
4 changed files with 12 additions and 1 deletions

View File

@ -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<char*>(commandBuffer), writeLclConfig.size(), 0);
rawPacketLen = writeLclConfig.size();
rawPacket = commandBuffer;
return RETURN_OK;
}
case (SYRLINKS::READ_RX_STATUS_REGISTERS): {
readRxStatusRegCommand.copy(reinterpret_cast<char*>(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,

View File

@ -61,12 +61,14 @@ class SyrlinksHkHandler : public DeviceHandlerBase {
static const uint8_t CRC_INITIAL_VALUE = 0x0;
// Uses CRC-16/XMODEM
std::string resetCommand = "<C04:5A5A:FF41>";
std::string readRxStatusRegCommand = "<E00::825B>";
std::string setTxModeStandby = "<W04:4000:7E58>";
/** W - write, 04 - 4 bytes in data field, 01 - value, 40 register to write value */
std::string setTxModeModulation = "<W04:4001:4D69>";
std::string setTxModeCw = "<W04:4010:4968>";
std::string writeLclConfig = "<W04:0703:F320>";
std::string readTxStatus = "<R02:40:7555>";
std::string readTxWaveform = "<R02:44:B991>";
std::string readTxAgcValueHighByte = "<R02:46:DFF3>";

View File

@ -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;

2
tmtc

@ -1 +1 @@
Subproject commit 5816f05ccf8971f3cf2dd1d603dd3f5a33f6f504
Subproject commit c1a8170945f1cb5ed041175506eb8c1cfcbefc6a