dummy stuff
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit

This commit is contained in:
Marius Eggert 2022-11-10 16:31:59 +01:00
parent 8cc368b131
commit ca9ef28199
3 changed files with 15 additions and 13 deletions

View File

@ -37,8 +37,8 @@ uint32_t GpsDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return
ReturnValue_t GpsDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap, ReturnValue_t GpsDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) { LocalDataPoolManager &poolManager) {
localDataPoolMap.emplace(GpsHyperion::LATITUDE, new PoolEntry<double>({0.0})); localDataPoolMap.emplace(GpsHyperion::LATITUDE, new PoolEntry<double>({0.0}, 1));
localDataPoolMap.emplace(GpsHyperion::LONGITUDE, new PoolEntry<double>({0.0})); localDataPoolMap.emplace(GpsHyperion::LONGITUDE, new PoolEntry<double>({0.0}, 1));
localDataPoolMap.emplace(GpsHyperion::ALTITUDE, new PoolEntry<double>({0.0})); localDataPoolMap.emplace(GpsHyperion::ALTITUDE, new PoolEntry<double>({0.0}));
localDataPoolMap.emplace(GpsHyperion::SPEED, new PoolEntry<double>({7684.2})); localDataPoolMap.emplace(GpsHyperion::SPEED, new PoolEntry<double>({7684.2}));
localDataPoolMap.emplace(GpsHyperion::FIX_MODE, new PoolEntry<uint8_t>({0})); localDataPoolMap.emplace(GpsHyperion::FIX_MODE, new PoolEntry<uint8_t>({0}));

View File

@ -1,5 +1,7 @@
#include "SusDummy.h" #include "SusDummy.h"
#include <fsfw/datapool/PoolReadGuard.h>
#include <objects/systemObjectList.h> #include <objects/systemObjectList.h>
#include <cmath> #include <cmath>
@ -28,7 +30,6 @@ ReturnValue_t SusDummy::initialize() {
return result; return result;
} }
} }
return returnvalue::OK; return returnvalue::OK;
} }
@ -37,29 +38,30 @@ ReturnValue_t SusDummy::handleCommandMessage(CommandMessage* message) {
} }
void SusDummy::performControlOperation() { void SusDummy::performControlOperation() {
iteration++; // value = sin(iteration / 80. * M_PI + 10) * 10 - 10;
value = sin(iteration / 80. * M_PI + 10) * 10 - 10;
susSet.read(); susSet.read();
// susSet.temperatureCelcius = value; // susSet.temperatureCelcius = value;
// if ((iteration % 100) < 20) { // if ((iteration % 100) < 20) {
// susSet.setValidity(false, true); // susSet.setValidity(false, true);
// } else { // } else {
// susSet.setValidity(true, true); // susSet.setValidity(true, true);
// } // }
susSet.channels[0] = 3913; susSet.channels[0] = 3913;
susSet.channels[1] = 3912; susSet.channels[1] = 3912;
susSet.channels[2] = 3799; susSet.channels[2] = 3799;
susSet.channels[3] = 3797; susSet.channels[3] = 3797;
susSet.channels[4] = 4056; susSet.channels[4] = 4056;
susSet.setValidity(true, true);
susSet.commit(); susSet.commit();
iteration++;
} }
ReturnValue_t SusDummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap, ReturnValue_t SusDummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
LocalDataPoolManager& poolManager) { LocalDataPoolManager& poolManager) {
localDataPoolMap.emplace(SUS::SusPoolIds::TEMPERATURE_C, new PoolEntry<float>({0}, 1, true)); localDataPoolMap.emplace(SUS::SusPoolIds::TEMPERATURE_C, new PoolEntry<float>({0}, 1, true));
localDataPoolMap.emplace(SUS::SusPoolIds::CHANNEL_VEC, localDataPoolMap.emplace(SUS::SusPoolIds::CHANNEL_VEC,
new PoolEntry<uint16_t>({0, 0, 0, 0, 0, 0},true)); new PoolEntry<uint16_t>({0, 0, 0, 0, 0, 0}, true));
return returnvalue::OK; return returnvalue::OK;
} }