WIP: PL PCDU #142

Closed
muellerr wants to merge 118 commits from mueller/plpcdu-sus-updates into develop
8 changed files with 64 additions and 36 deletions
Showing only changes of commit fc3fb70025 - Show all commits

View File

@ -1,6 +1,7 @@
#include <fsfw/events/EventManager.h>
#include "CoreController.h" #include "CoreController.h"
#include <fsfw/events/EventManager.h>
#include "OBSWConfig.h" #include "OBSWConfig.h"
#include "OBSWVersion.h" #include "OBSWVersion.h"
#include "fsfw/FSFWVersion.h" #include "fsfw/FSFWVersion.h"
@ -101,7 +102,7 @@ ReturnValue_t CoreController::initializeAfterTaskCreation() {
updateProtInfo(); updateProtInfo();
initPrint(); initPrint();
auto eventManager = ObjectManager::instance()->get<EventManager>(objects::EVENT_MANAGER); auto eventManager = ObjectManager::instance()->get<EventManager>(objects::EVENT_MANAGER);
if(eventManager != nullptr) { if (eventManager != nullptr) {
eventManager->printListeners(); eventManager->printListeners();
} }
return result; return result;

View File

@ -43,6 +43,7 @@
#include "linux/boardtest/SpiTestClass.h" #include "linux/boardtest/SpiTestClass.h"
#include "linux/csp/CspComIF.h" #include "linux/csp/CspComIF.h"
#include "linux/csp/CspCookie.h" #include "linux/csp/CspCookie.h"
#include "linux/devices/GPSHyperionLinuxController.h"
#include "linux/devices/PayloadPcduHandler.h" #include "linux/devices/PayloadPcduHandler.h"
#include "linux/devices/SolarArrayDeploymentHandler.h" #include "linux/devices/SolarArrayDeploymentHandler.h"
#include "linux/devices/SusHandler.h" #include "linux/devices/SusHandler.h"
@ -51,7 +52,6 @@
#include "mission/core/GenericFactory.h" #include "mission/core/GenericFactory.h"
#include "mission/devices/ACUHandler.h" #include "mission/devices/ACUHandler.h"
#include "mission/devices/BpxBatteryHandler.h" #include "mission/devices/BpxBatteryHandler.h"
#include "mission/devices/GPSHyperionLinuxController.h"
#include "mission/devices/GyroADIS1650XHandler.h" #include "mission/devices/GyroADIS1650XHandler.h"
#include "mission/devices/HeaterHandler.h" #include "mission/devices/HeaterHandler.h"
#include "mission/devices/IMTQHandler.h" #include "mission/devices/IMTQHandler.h"
@ -878,13 +878,40 @@ void ObjectFactory::createRtdComponents(LinuxLibgpioIF* gpioComIF) {
Max31865PT1000Handler* rtdIc15 = Max31865PT1000Handler* rtdIc15 =
new Max31865PT1000Handler(objects::RTD_IC_18, objects::SPI_COM_IF, spiRtdIc15); new Max31865PT1000Handler(objects::RTD_IC_18, objects::SPI_COM_IF, spiRtdIc15);
#if OBSW_TEST_RTD == 1
rtdIc0->setStartUpImmediately(); rtdIc0->setStartUpImmediately();
rtdIc1->setStartUpImmediately(); rtdIc1->setStartUpImmediately();
rtdIc2->setStartUpImmediately(); rtdIc2->setStartUpImmediately();
#if OBSW_DEBUG_RTD == 1 rtdIc3->setStartUpImmediately();
rtdIc4->setStartUpImmediately();
rtdIc5->setStartUpImmediately();
rtdIc6->setStartUpImmediately();
rtdIc7->setStartUpImmediately();
rtdIc8->setStartUpImmediately();
rtdIc9->setStartUpImmediately();
rtdIc10->setStartUpImmediately();
rtdIc11->setStartUpImmediately();
rtdIc12->setStartUpImmediately();
rtdIc13->setStartUpImmediately();
rtdIc14->setStartUpImmediately();
rtdIc15->setStartUpImmediately();
rtdIc0->setInstantNormal(true); rtdIc0->setInstantNormal(true);
rtdIc1->setInstantNormal(true); rtdIc1->setInstantNormal(true);
rtdIc2->setInstantNormal(true); rtdIc2->setInstantNormal(true);
rtdIc3->setInstantNormal(true);
rtdIc4->setInstantNormal(true);
rtdIc5->setInstantNormal(true);
rtdIc6->setInstantNormal(true);
rtdIc7->setInstantNormal(true);
rtdIc8->setInstantNormal(true);
rtdIc9->setInstantNormal(true);
rtdIc10->setInstantNormal(true);
rtdIc11->setInstantNormal(true);
rtdIc12->setInstantNormal(true);
rtdIc13->setInstantNormal(true);
rtdIc14->setInstantNormal(true);
rtdIc15->setInstantNormal(true);
#endif #endif
static_cast<void>(rtdIc0); static_cast<void>(rtdIc0);

View File

@ -10,7 +10,9 @@
PlocMemoryDumper::PlocMemoryDumper(object_id_t objectId) PlocMemoryDumper::PlocMemoryDumper(object_id_t objectId)
: SystemObject(objectId), commandActionHelper(this), actionHelper(this, nullptr) { : SystemObject(objectId), commandActionHelper(this), actionHelper(this, nullptr) {
commandQueue = QueueFactory::instance()->createMessageQueue(QUEUE_SIZE); auto mqArgs = MqArgs(this->getObjectId());
commandQueue = QueueFactory::instance()->createMessageQueue(
QUEUE_SIZE, MessageQueueMessage::MAX_MESSAGE_SIZE, &mqArgs);
} }
PlocMemoryDumper::~PlocMemoryDumper() {} PlocMemoryDumper::~PlocMemoryDumper() {}

View File

@ -8,7 +8,9 @@
PlocUpdater::PlocUpdater(object_id_t objectId) PlocUpdater::PlocUpdater(object_id_t objectId)
: SystemObject(objectId), commandActionHelper(this), actionHelper(this, nullptr) { : SystemObject(objectId), commandActionHelper(this), actionHelper(this, nullptr) {
commandQueue = QueueFactory::instance()->createMessageQueue(QUEUE_SIZE); auto mqArgs = MqArgs(this->getObjectId());
commandQueue = QueueFactory::instance()->createMessageQueue(
QUEUE_SIZE, MessageQueueMessage::MAX_MESSAGE_SIZE, &mqArgs);
} }
PlocUpdater::~PlocUpdater() {} PlocUpdater::~PlocUpdater() {}

View File

@ -45,8 +45,8 @@ StarTrackerHandler::StarTrackerHandler(object_id_t objectId, object_id_t comIF,
sif::error << "StarTrackerHandler: Invalid str image loader" << std::endl; sif::error << "StarTrackerHandler: Invalid str image loader" << std::endl;
} }
auto mqArgs = MqArgs(this->getObjectId()); auto mqArgs = MqArgs(this->getObjectId());
eventQueue = QueueFactory::instance()->createMessageQueue(EventMessage::EVENT_MESSAGE_SIZE * 5, eventQueue = QueueFactory::instance()->createMessageQueue(
MessageQueueMessage::MAX_MESSAGE_SIZE, &mqArgs); EventMessage::EVENT_MESSAGE_SIZE * 5, MessageQueueMessage::MAX_MESSAGE_SIZE, &mqArgs);
} }
StarTrackerHandler::~StarTrackerHandler() {} StarTrackerHandler::~StarTrackerHandler() {}

View File

@ -228,8 +228,8 @@ void SusHandler::setToGoToNormalMode(bool enable) { this->goToNormalModeImmediat
void SusHandler::printDataset() { void SusHandler::printDataset() {
#if OBSW_VERBOSE_LEVEL >= 1 && OBSW_DEBUG_SUS == 1 #if OBSW_VERBOSE_LEVEL >= 1 && OBSW_DEBUG_SUS == 1
if (divider.checkAndIncrement()) { if (divider.checkAndIncrement()) {
sif::info << "SUS " << std::setw(2) << std::dec << static_cast<int>(susIdx) << " ID " << std::hex sif::info << "SUS " << std::setw(2) << std::dec << static_cast<int>(susIdx) << " ID "
<< "0x" << this->getObjectId() << " [" << std::hex << std::setw(3); << std::hex << "0x" << this->getObjectId() << " [" << std::hex << std::setw(3);
sif::info << dataset.ain0 << ","; sif::info << dataset.ain0 << ",";
sif::info << dataset.ain1 << ","; sif::info << dataset.ain1 << ",";
sif::info << dataset.ain2 << ","; sif::info << dataset.ain2 << ",";

View File

@ -82,6 +82,7 @@ debugging. */
#define OBSW_TEST_SUS_HANDLER 0 #define OBSW_TEST_SUS_HANDLER 0
#define OBSW_TEST_PLOC_HANDLER 0 #define OBSW_TEST_PLOC_HANDLER 0
#define OBSW_TEST_BPX_BATT 0 #define OBSW_TEST_BPX_BATT 0
#define OBSW_TEST_RTD 0
#define OBSW_TEST_CCSDS_BRIDGE 0 #define OBSW_TEST_CCSDS_BRIDGE 0
#define OBSW_TEST_CCSDS_PTME 0 #define OBSW_TEST_CCSDS_PTME 0
#define OBSW_TEST_TE7020_HEATER 0 #define OBSW_TEST_TE7020_HEATER 0

View File

@ -371,32 +371,27 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.7, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.7, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.85, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.85, DeviceHandlerIF::GET_READ);
// thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0, thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0,
// DeviceHandlerIF::PERFORM_OPERATION); DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.25, thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.25,
// DeviceHandlerIF::SEND_WRITE); DeviceHandlerIF::SEND_WRITE);
// thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.6, thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.6, DeviceHandlerIF::GET_WRITE);
// DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.75, DeviceHandlerIF::SEND_READ);
// 0.75, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.85, DeviceHandlerIF::GET_READ);
// length * 0.85, DeviceHandlerIF::GET_READ);
// thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0,
// thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
// DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.3, DeviceHandlerIF::SEND_WRITE);
// thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.3, thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.6, DeviceHandlerIF::GET_WRITE);
// DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.75, DeviceHandlerIF::SEND_READ);
// 0.6, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.85, DeviceHandlerIF::GET_READ);
// length * 0.75, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER, length * 0.85, thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0,
// DeviceHandlerIF::GET_READ); DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.35, DeviceHandlerIF::SEND_WRITE);
// thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0, thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.6, DeviceHandlerIF::GET_WRITE);
// DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.75, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.35, thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.85, DeviceHandlerIF::GET_READ);
// DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length *
// 0.6, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER,
// length * 0.75, DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.85,
// DeviceHandlerIF::GET_READ);
} }
if (enableBside) { if (enableBside) {