decoupled IMTQ handler from OBSWConfig.h
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
This commit is contained in:
parent
26d66d2a36
commit
521b47d9fc
@ -147,6 +147,7 @@ void ObjectFactory::produce(void* args) {
|
||||
new I2cCookie(addresses::IMTQ, IMTQ::MAX_REPLY_SIZE, q7s::I2C_DEFAULT_DEV);
|
||||
auto imtqHandler = new IMTQHandler(objects::IMTQ_HANDLER, objects::I2C_COM_IF, imtqI2cCookie);
|
||||
#if OBSW_DEBUG_IMTQ == 1
|
||||
imtqHandler->setToGoToNormal();
|
||||
imtqHandler->setStartUpImmediately();
|
||||
#endif
|
||||
#endif
|
||||
|
@ -517,7 +517,6 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
|
||||
}
|
||||
|
||||
ReturnValue_t pst::pstI2c(FixedTimeslotTaskIF *thisSequence) {
|
||||
|
||||
// Length of a communication cycle
|
||||
uint32_t length = thisSequence->getPeriodMs();
|
||||
#if OBSW_ADD_MGT == 1
|
||||
|
@ -2,9 +2,8 @@
|
||||
|
||||
#include <fsfw/datapool/PoolReadGuard.h>
|
||||
#include <fsfw/globalfunctions/CRC.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "OBSWConfig.h"
|
||||
#include <cmath>
|
||||
|
||||
IMTQHandler::IMTQHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie)
|
||||
: DeviceHandlerBase(objectId, comIF, comCookie),
|
||||
@ -25,11 +24,11 @@ IMTQHandler::IMTQHandler(object_id_t objectId, object_id_t comIF, CookieIF* comC
|
||||
IMTQHandler::~IMTQHandler() {}
|
||||
|
||||
void IMTQHandler::doStartUp() {
|
||||
#if OBSW_SWITCH_TO_NORMAL_MODE_AFTER_STARTUP == 1
|
||||
if (goToNormalMode) {
|
||||
setMode(MODE_NORMAL);
|
||||
#else
|
||||
} else {
|
||||
setMode(_MODE_TO_ON);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void IMTQHandler::doShutDown() { setMode(_MODE_POWER_DOWN); }
|
||||
@ -694,7 +693,7 @@ void IMTQHandler::fillEngHkDataset(const uint8_t* packet) {
|
||||
#endif
|
||||
}
|
||||
|
||||
void IMTQHandler::setModeNormal() { mode = MODE_NORMAL; }
|
||||
void IMTQHandler::setToGoToNormal() { mode = MODE_NORMAL; }
|
||||
|
||||
void IMTQHandler::handleDeviceTM(const uint8_t* data, size_t dataSize, DeviceCommandId_t replyId) {
|
||||
if (wiretappingMode == RAW) {
|
||||
|
@ -18,7 +18,7 @@ class IMTQHandler : public DeviceHandlerBase {
|
||||
/**
|
||||
* @brief Sets mode to MODE_NORMAL. Can be used for debugging.
|
||||
*/
|
||||
void setModeNormal();
|
||||
void setToGoToNormal();
|
||||
|
||||
protected:
|
||||
void doStartUp() override;
|
||||
@ -96,6 +96,7 @@ class IMTQHandler : public DeviceHandlerBase {
|
||||
IMTQ::NegZSelfTestSet negZselfTestDataset;
|
||||
|
||||
uint8_t commandBuffer[IMTQ::MAX_COMMAND_SIZE];
|
||||
bool goToNormalMode = false;
|
||||
|
||||
enum class CommunicationStep {
|
||||
GET_ENG_HK_DATA,
|
||||
|
Loading…
Reference in New Issue
Block a user