Merge branch 'develop' into mohr/introspection
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit

This commit is contained in:
2022-08-18 13:15:58 +02:00
49 changed files with 503 additions and 207 deletions

View File

@ -8,6 +8,7 @@
#include <fsfw_hal/linux/spi/SpiCookie.h>
#include <linux/callbacks/gpioCallbacks.h>
#include <linux/devices/Max31865RtdLowlevelHandler.h>
#include <mission/controller/AcsController.h>
#include <mission/controller/ThermalController.h>
#include <mission/devices/Max31865EiveHandler.h>
#include <mission/devices/Max31865PT1000Handler.h>
@ -324,6 +325,8 @@ void ObjectFactory::createThermalController() {
new ThermalController(objects::THERMAL_CONTROLLER, objects::NO_OBJECT);
}
void ObjectFactory::createAcsController() { new AcsController(objects::ACS_CONTROLLER); }
void ObjectFactory::gpioChecker(ReturnValue_t result, std::string output) {
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "ObjectFactory: Adding GPIOs failed for " << output << std::endl;

View File

@ -1,6 +1,7 @@
#pragma once
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
#include <fsfw_hal/linux/gpio/LinuxLibgpioIF.h>
#include <string>
@ -18,5 +19,6 @@ void createRtdComponents(std::string spiDev, GpioIF* gpioComIF, PowerSwitchIF* p
void gpioChecker(ReturnValue_t result, std::string output);
void createThermalController();
void createAcsController();
} // namespace ObjectFactory

View File

@ -65,7 +65,7 @@ MessageQueueIF* PlocMemoryDumper::getCommandQueuePtr() { return commandQueue; }
void PlocMemoryDumper::readCommandQueue() {
CommandMessage message;
ReturnValue_t result;
ReturnValue_t result = RETURN_OK;
for (result = commandQueue->receiveMessage(&message); result == HasReturnvaluesIF::RETURN_OK;
result = commandQueue->receiveMessage(&message)) {

View File

@ -1,7 +1,7 @@
/**
* @brief Auto-generated event translation file. Contains 207 translations.
* @brief Auto-generated event translation file. Contains 209 translations.
* @details
* Generated on: 2022-06-21 01:20:13
* Generated on: 2022-08-12 12:30:32
*/
#include "translateEvents.h"
@ -134,6 +134,8 @@ const char *INVALID_TC_FRAME_STRING = "INVALID_TC_FRAME";
const char *INVALID_FAR_STRING = "INVALID_FAR";
const char *CARRIER_LOCK_STRING = "CARRIER_LOCK";
const char *BIT_LOCK_PDEC_STRING = "BIT_LOCK_PDEC";
const char *LOST_CARRIER_LOCK_PDEC_STRING = "LOST_CARRIER_LOCK_PDEC";
const char *LOST_BIT_LOCK_PDEC_STRING = "LOST_BIT_LOCK_PDEC";
const char *IMAGE_UPLOAD_FAILED_STRING = "IMAGE_UPLOAD_FAILED";
const char *IMAGE_DOWNLOAD_FAILED_STRING = "IMAGE_DOWNLOAD_FAILED";
const char *IMAGE_UPLOAD_SUCCESSFUL_STRING = "IMAGE_UPLOAD_SUCCESSFUL";
@ -469,6 +471,10 @@ const char *translateEvents(Event event) {
return CARRIER_LOCK_STRING;
case (12404):
return BIT_LOCK_PDEC_STRING;
case (12405):
return LOST_CARRIER_LOCK_PDEC_STRING;
case (12406):
return LOST_BIT_LOCK_PDEC_STRING;
case (12500):
return IMAGE_UPLOAD_FAILED_STRING;
case (12501):

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file.
* @details
* Contains 132 translations.
* Generated on: 2022-06-21 00:51:33
* Generated on: 2022-08-12 12:30:32
*/
#include "translateObjects.h"

View File

@ -192,15 +192,20 @@ bool PdecHandler::newTcReceived() {
void PdecHandler::checkLocks() {
uint32_t clcw = getClcw();
if (!(clcw & NO_RF_MASK) && (lastClcw & NO_RF_MASK)) {
// Rf available changed from 0 to 1
if (not(clcw & NO_RF_MASK) && not carrierLock) {
triggerEvent(CARRIER_LOCK);
carrierLock = true;
} else if ((clcw & NO_RF_MASK) && carrierLock) {
carrierLock = false;
triggerEvent(LOST_CARRIER_LOCK_PDEC);
}
if (!(clcw & NO_BITLOCK_MASK) && (lastClcw & NO_BITLOCK_MASK)) {
// Bit lock changed from 0 to 1
if (not(clcw & NO_BITLOCK_MASK) && not bitLock) {
triggerEvent(BIT_LOCK_PDEC);
bitLock = true;
} else if ((clcw & NO_BITLOCK_MASK) && bitLock) {
bitLock = false;
triggerEvent(LOST_BIT_LOCK_PDEC);
}
lastClcw = clcw;
}
bool PdecHandler::checkFrameAna(uint32_t pdecFar) {

View File

@ -76,6 +76,10 @@ class PdecHandler : public SystemObject,
static const Event CARRIER_LOCK = MAKE_EVENT(3, severity::INFO);
//! [EXPORT] : [COMMENT] Bit lock detected (data valid)
static const Event BIT_LOCK_PDEC = MAKE_EVENT(4, severity::INFO);
//! [EXPORT] : [COMMENT] Lost carrier lock
static const Event LOST_CARRIER_LOCK_PDEC = MAKE_EVENT(5, severity::INFO);
//! [EXPORT] : [COMMENT] Lost bit lock
static const Event LOST_BIT_LOCK_PDEC = MAKE_EVENT(6, severity::INFO);
private:
static const uint8_t INTERFACE_ID = CLASS_ID::PDEC_HANDLER;
@ -386,6 +390,9 @@ class PdecHandler : public SystemObject,
// Used to check carrier and bit lock changes (default set to no rf and no bitlock)
uint32_t lastClcw = 0xC000;
bool carrierLock = false;
bool bitLock = false;
};
#endif /* LINUX_OBC_PDECHANDLER_H_ */