v1.15.0 #311
@ -141,11 +141,15 @@ bool SolarArrayDeploymentHandler::autonomousDeplForFile(const char* filename) {
|
|||||||
}
|
}
|
||||||
lineNum++;
|
lineNum++;
|
||||||
}
|
}
|
||||||
|
bool updateUptime = false;
|
||||||
|
if(opDivider.checkAndIncrement()) {
|
||||||
if (initUptime) {
|
if (initUptime) {
|
||||||
secsSinceBoot = initUptime.value();
|
secsSinceBoot = initUptime.value();
|
||||||
}
|
}
|
||||||
// Uptime has increased by X seconds so we need to update the uptime count inside the file
|
// Uptime has increased by X seconds so we need to update the uptime count inside the file
|
||||||
secsSinceBoot += Clock::getUptime().tv_sec;
|
secsSinceBoot += Clock::getUptime().tv_sec;
|
||||||
|
updateUptime = true;
|
||||||
|
}
|
||||||
if (stateSwitch) {
|
if (stateSwitch) {
|
||||||
if (deplState == AutonomousDeplState::FIRST_BURN or
|
if (deplState == AutonomousDeplState::FIRST_BURN or
|
||||||
deplState == AutonomousDeplState::SECOND_BURN) {
|
deplState == AutonomousDeplState::SECOND_BURN) {
|
||||||
@ -154,6 +158,9 @@ bool SolarArrayDeploymentHandler::autonomousDeplForFile(const char* filename) {
|
|||||||
startFsm(false, false);
|
startFsm(false, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(stateSwitch or updateUptime) {
|
||||||
|
// TODO: Write new file here
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#ifndef MISSION_DEVICES_SOLARARRAYDEPLOYMENT_H_
|
#ifndef MISSION_DEVICES_SOLARARRAYDEPLOYMENT_H_
|
||||||
#define MISSION_DEVICES_SOLARARRAYDEPLOYMENT_H_
|
#define MISSION_DEVICES_SOLARARRAYDEPLOYMENT_H_
|
||||||
|
|
||||||
|
#include <fsfw/globalfunctions/PeriodicOperationDivider.h>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
#include "devices/powerSwitcherList.h"
|
#include "devices/powerSwitcherList.h"
|
||||||
@ -109,6 +110,7 @@ class SolarArrayDeploymentHandler : public ExecutableObjectIF,
|
|||||||
bool actionActive = false;
|
bool actionActive = false;
|
||||||
ActionId_t activeCmd = HasActionsIF::INVALID_ACTION_ID;
|
ActionId_t activeCmd = HasActionsIF::INVALID_ACTION_ID;
|
||||||
std::optional<uint64_t> initUptime;
|
std::optional<uint64_t> initUptime;
|
||||||
|
PeriodicOperationDivider opDivider = PeriodicOperationDivider(5);
|
||||||
uint8_t retryCounter = 3;
|
uint8_t retryCounter = 3;
|
||||||
struct FsmInfo {
|
struct FsmInfo {
|
||||||
// false if OFF, true is ON
|
// false if OFF, true is ON
|
||||||
|
Loading…
Reference in New Issue
Block a user