changelog correction
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Robin Müller 2023-01-26 14:39:23 +01:00
parent 4dca9f21d4
commit 03a3c3a761
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
6 changed files with 39 additions and 12 deletions

View File

@ -27,8 +27,10 @@ list yields a list of all related PRs for each release.
## Added ## Added
- The Syrlinks handler has submodes for the TX mode now: TX Standby (1), TX Modulation (2) and - The Syrlinks handler has submodes for the TX mode now: RX Only (1), RX and TX default
TX Carrier Wave (3). The submodes apply for both ON and NORMAL mode. datarate (2), RX and TX Low Rate (3), RX and TX High Rate (4) and TX Carrier Wave (3).
The submodes apply for both ON and NORMAL mode. The default datarate can be updated using
a parameter command (domain ID 0 and unique ID 0) with value 0 for low rate and 1 for high rate.
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/353 PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/353
- Startracker temperature set and PCDU switcher set are diagnostic now - Startracker temperature set and PCDU switcher set are diagnostic now

View File

@ -3,7 +3,7 @@
namespace com { namespace com {
enum class Datarate { LOW_RATE_MODULATION_BPSK, HIGH_RATE_MODULATION_0QPSK }; enum class Datarate: uint8_t { LOW_RATE_MODULATION_BPSK, HIGH_RATE_MODULATION_0QPSK, NUM_DATARATES };
} }

View File

@ -19,11 +19,6 @@ SyrlinksHandler::SyrlinksHandler(object_id_t objectId, object_id_t comIF, Cookie
SyrlinksHandler::~SyrlinksHandler() = default; SyrlinksHandler::~SyrlinksHandler() = default;
void SyrlinksHandler::doStartUp() { void SyrlinksHandler::doStartUp() {
if (internalState != InternalState::OFF) {
sif::error << "SyrlinksHandler::doStartUp: Not in internal OFF mode, possible config error"
<< std::endl;
internalState = InternalState::OFF;
}
if (internalState == InternalState::OFF) { if (internalState == InternalState::OFF) {
internalState = InternalState::ENABLE_TEMPERATURE_PROTECTION; internalState = InternalState::ENABLE_TEMPERATURE_PROTECTION;
commandExecuted = false; commandExecuted = false;
@ -685,6 +680,25 @@ ReturnValue_t SyrlinksHandler::isModeCombinationValid(Mode_t mode, Submode_t sub
return DeviceHandlerBase::isModeCombinationValid(mode, submode); return DeviceHandlerBase::isModeCombinationValid(mode, submode);
} }
ReturnValue_t SyrlinksHandler::getParameter(uint8_t domainId, uint8_t uniqueId,
ParameterWrapper *parameterWrapper, const ParameterWrapper *newValues, uint16_t startAtIndex) {
if((domainId == 0) and (uniqueId == static_cast<uint8_t>(syrlinks::ParameterId::DATARATE))) {
if(newValues->getSerializedSize() != 1) {
return HasParametersIF::INVALID_VALUE;
}
uint8_t newVal = 0;
ReturnValue_t result = newValues->getElement(&newVal);
if(result != returnvalue::OK) {
return result;
}
if(newVal >= static_cast<uint8_t>(com::Datarate::NUM_DATARATES)) {
return HasParametersIF::INVALID_VALUE;
}
parameterWrapper->set(&datarateCfgRaw);
}
return DeviceHandlerBase::getParameter(domainId, uniqueId, parameterWrapper, newValues, startAtIndex);
}
void SyrlinksHandler::prepareCommand(std::string command, DeviceCommandId_t commandId) { void SyrlinksHandler::prepareCommand(std::string command, DeviceCommandId_t commandId) {
command.copy(reinterpret_cast<char*>(commandBuffer), command.size(), 0); command.copy(reinterpret_cast<char*>(commandBuffer), command.size(), 0);
rawPacketLen = command.size(); rawPacketLen = command.size();
@ -724,11 +738,11 @@ void SyrlinksHandler::doTransition(Mode_t modeFrom, Submode_t subModeFrom) {
if (tgtMode == HasModesIF::MODE_ON or tgtMode == DeviceHandlerIF::MODE_NORMAL) { if (tgtMode == HasModesIF::MODE_ON or tgtMode == DeviceHandlerIF::MODE_NORMAL) {
switch (getSubmode()) { switch (getSubmode()) {
case (syrlinks::Submode::RX_AND_TX_DEFAULT_DATARATE): { case (syrlinks::Submode::RX_AND_TX_DEFAULT_DATARATE): {
if (datarateCfg == com::Datarate::LOW_RATE_MODULATION_BPSK) { if (datarateCfgRaw == static_cast<uint8_t>(com::Datarate::LOW_RATE_MODULATION_BPSK)) {
if (txOnHandler(InternalState::SELECT_MODULATION_BPSK)) { if (txOnHandler(InternalState::SELECT_MODULATION_BPSK)) {
return; return;
} }
} else if (datarateCfg == com::Datarate::HIGH_RATE_MODULATION_0QPSK) { } else if (datarateCfgRaw == static_cast<uint8_t>(com::Datarate::HIGH_RATE_MODULATION_0QPSK)) {
if (txOnHandler(InternalState::SELECT_MODULATION_0QPSK)) { if (txOnHandler(InternalState::SELECT_MODULATION_0QPSK)) {
return; return;
} }

View File

@ -52,6 +52,11 @@ class SyrlinksHandler : public DeviceHandlerBase {
LocalDataPoolManager& poolManager) override; LocalDataPoolManager& poolManager) override;
LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override; LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override;
// Parameter IF
ReturnValue_t getParameter(uint8_t domainId, uint8_t uniqueId,
ParameterWrapper *parameterWrapper,
const ParameterWrapper *newValues,
uint16_t startAtIndex) override;
private: private:
static const uint8_t INTERFACE_ID = CLASS_ID::SYRLINKS_HANDLER; static const uint8_t INTERFACE_ID = CLASS_ID::SYRLINKS_HANDLER;
@ -100,7 +105,9 @@ class SyrlinksHandler : public DeviceHandlerBase {
syrlinks::TemperatureSet temperatureSet; syrlinks::TemperatureSet temperatureSet;
const power::Switch_t powerSwitch = power::NO_SWITCH; const power::Switch_t powerSwitch = power::NO_SWITCH;
com::Datarate datarateCfg = com::Datarate::LOW_RATE_MODULATION_BPSK; // Use uint8_t for compatibility with parameter interface
uint8_t datarateCfgRaw = static_cast<uint8_t>(com::Datarate::LOW_RATE_MODULATION_BPSK);
//com::Datarate datarateCfg = com::Datarate::LOW_RATE_MODULATION_BPSK;
bool debugMode = false; bool debugMode = false;
uint8_t agcValueHighByte = 0; uint8_t agcValueHighByte = 0;

View File

@ -6,6 +6,10 @@
namespace syrlinks { namespace syrlinks {
enum class ParameterId: uint8_t {
DATARATE = 0
};
enum Submode { enum Submode {
DEFAULT, DEFAULT,
RX_ONLY, RX_ONLY,

2
tmtc

@ -1 +1 @@
Subproject commit 99d5ed014bc3264b621c066ba0fb035b1037a637 Subproject commit 2ac182e753565f8fff2729bca81a80263d9460ca