Merge remote-tracking branch 'origin/develop' into rework_acs_board_polling

This commit is contained in:
2023-02-28 11:53:10 +01:00
22 changed files with 683 additions and 161 deletions

View File

@ -0,0 +1,9 @@
#ifndef MISSION_CONFIG_CONFIGFILE_H_
#define MISSION_CONFIG_CONFIGFILE_H_
namespace configfile {
// Name of global config file relative to currently mounted SD card
static const char sdrelative[] = "config/global_config.json";
} // namespace configfile
#endif /* MISSION_CONFIG_CONFIGFILE_H_ */

View File

@ -667,7 +667,7 @@ ReturnValue_t PayloadPcduHandler::getParameter(uint8_t domainId, uint8_t uniqueI
}
void PayloadPcduHandler::handleFailureInjection(std::string output, Event event) {
sif::info << "PayloadPcduHandler::checkAdcValues: " << output
sif::info << "PayloadPcduHandler::handleFailureInjection: " << output
<< " failure injection. "
"Transitioning back to off"
<< std::endl;

View File

@ -7,6 +7,8 @@
NVMParameterBase::NVMParameterBase(std::string fullName) : fullName(fullName) {}
NVMParameterBase::NVMParameterBase() {}
ReturnValue_t NVMParameterBase::readJsonFile() {
if (std::filesystem::exists(fullName)) {
// Read JSON file content into object

View File

@ -14,6 +14,12 @@ class NVMParameterBase {
NVMParameterBase(std::string fullName);
/**
* @brief Use this constructor when name of json file shall be set on an later
* point
*/
NVMParameterBase();
bool getJsonFileExists();
/**
@ -25,7 +31,7 @@ class NVMParameterBase {
virtual ReturnValue_t writeJsonFile();
void setFullName(std::string fullName);
virtual void setFullName(std::string fullName);
std::string getFullName() const;
template <typename T>
@ -48,7 +54,7 @@ class NVMParameterBase {
nlohmann::json json;
std::vector<std::string> keys;
std::string fullName;
std::string fullName = "";
};
template <typename T>

View File

@ -166,6 +166,7 @@ void ComSubsystem::handleBitLockEvent() {
rememberBitLock = true;
return;
}
triggerEvent(BIT_LOCK_TX_ON);
startRxAndTxLowRateSeq();
}
@ -183,6 +184,7 @@ void ComSubsystem::startRxAndTxLowRateSeq() {
void ComSubsystem::checkTransmitterCountdown() {
if (transmitterCountdown.hasTimedOut()) {
triggerEvent(TX_TIMER_EXPIRED, transmitterTimeout);
startTransition(com::Submode::RX_ONLY, SUBMODE_NONE);
countdownActive = false;
}

View File

@ -5,11 +5,21 @@
#include <fsfw/parameters/HasParametersIF.h>
#include <fsfw/parameters/ParameterHelper.h>
#include <fsfw/subsystem/Subsystem.h>
#include <common/config/eive/eventSubsystemIds.h>
#include "mission/comDefs.h"
class ComSubsystem : public Subsystem, public ReceivesParameterMessagesIF {
public:
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::COM_SUBSYSTEM;
//! [EXPORT] : [COMMENT] The transmit timer to protect the Syrlinks expired
//! P1: The current timer value
static const Event TX_TIMER_EXPIRED = MAKE_EVENT(1, severity::INFO);
//! [EXPORT] : [COMMENT] Transmitter will be turned on due to detection of bitlock
static const Event BIT_LOCK_TX_ON = MAKE_EVENT(2, severity::INFO);
/**
* @brief Constructor
*
@ -17,8 +27,7 @@ class ComSubsystem : public Subsystem, public ReceivesParameterMessagesIF {
* @param maxNumberOfSequences
* @param maxNumberOfTables
* @param transmitterTimeout Maximum time the transmitter of the syrlinks
* will
* be enabled
* will be enabled
*/
ComSubsystem(object_id_t setObjectId, uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables,
uint32_t transmitterTimeout);
@ -55,6 +64,7 @@ class ComSubsystem : public Subsystem, public ReceivesParameterMessagesIF {
bool isTxMode(Mode_t mode);
uint8_t datarateCfg = static_cast<uint8_t>(com::Datarate::LOW_RATE_MODULATION_BPSK);
// Maximum time after which the transmitter will be turned of. This is a
// protection mechanism due prevent the syrlinks from overheating
uint32_t transmitterTimeout = 0;

View File

@ -11,10 +11,6 @@
static constexpr double PARAM0_DEFAULT = 5.0;
static constexpr int PARAM1_DEFAULT = 905;
enum ParamIds : uint8_t {
PARAM0 = 0,
PARAM1 = 1,
PARAM2 = 2,
};
enum ParamIds : uint8_t { PARAM0 = 0, PARAM1 = 1, PARAM2 = 2, PDEC_PW = 3, PDEC_NW = 4 };
#endif /* MISSION_UTILITY_GLOBALCONFIGFILEDEFINITIONS_H_ */