Merge pull request 'some fixes, this should work now' (#347) from allow_switch_interval_specification into develop
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
Reviewed-on: #347
This commit is contained in:
commit
43fa8bf403
13
CHANGELOG.md
13
CHANGELOG.md
@ -22,7 +22,15 @@ list yields a list of all related PRs for each release.
|
|||||||
- The ACS Controller Gyro Sets (raw and processed) and the MEKF dataset are diagnostics now.
|
- The ACS Controller Gyro Sets (raw and processed) and the MEKF dataset are diagnostics now.
|
||||||
- Bumped FSFW for Service 11 improvement which includes size and CRC check for contained TC
|
- Bumped FSFW for Service 11 improvement which includes size and CRC check for contained TC
|
||||||
- Syrlinks module now always included for both EM and FM
|
- Syrlinks module now always included for both EM and FM
|
||||||
- RTD: Config is now written before each temperature request.
|
- SA Deployment: Allow specifying the switch interval and the initial channel. This allows testing
|
||||||
|
the new deployment procedure where each channel is burned for half of the whole burn duration.
|
||||||
|
It also allows burning only one channel for the whole burn duration. The autonomous mechanism
|
||||||
|
was adapted to burn each channel for half of the burn time by default.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/347
|
||||||
|
TMTC PR: https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/pulls/127
|
||||||
|
- `Max31865RtdLowlevelHandler.cpp`: For each RTD device, the config is now re-written before
|
||||||
|
every read. This seems to fix some issue with invalid temperature sensor readings.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/345
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
|
|
||||||
@ -31,9 +39,6 @@ list yields a list of all related PRs for each release.
|
|||||||
previous range setting was wrong. Also fixed a small error properly set internal state
|
previous range setting was wrong. Also fixed a small error properly set internal state
|
||||||
on shut-down.
|
on shut-down.
|
||||||
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/342
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/342
|
||||||
- `Max31865RtdLowlevelHandler.cpp`: For each RTD device, the config is now re-written before
|
|
||||||
every read. This seems to fix some issue with invalid temperature sensor readings.
|
|
||||||
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/345
|
|
||||||
|
|
||||||
# [v1.19.0] 10.01.2023
|
# [v1.19.0] 10.01.2023
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ static constexpr uint32_t SA_DEPL_INIT_BUFFER_SECS = 120;
|
|||||||
static constexpr uint32_t SA_DEPL_BURN_TIME_SECS = 180;
|
static constexpr uint32_t SA_DEPL_BURN_TIME_SECS = 180;
|
||||||
static constexpr uint32_t SA_DEPL_WAIT_TIME_SECS = 45 * 60;
|
static constexpr uint32_t SA_DEPL_WAIT_TIME_SECS = 45 * 60;
|
||||||
// HW constraints (current limit) mean that the GPIO channels need to be switched on in alternation
|
// HW constraints (current limit) mean that the GPIO channels need to be switched on in alternation
|
||||||
static constexpr uint32_t SA_DEPL_CHANNEL_ALTERNATION_INTERVAL_SECS = 5;
|
static constexpr uint32_t LEGACY_SA_DEPL_CHANNEL_ALTERNATION_INTERVAL_SECS = 5;
|
||||||
// Maximum allowed burn time allowed by the software.
|
// Maximum allowed burn time allowed by the software.
|
||||||
static constexpr uint32_t SA_DEPL_MAX_BURN_TIME = 180;
|
static constexpr uint32_t SA_DEPL_MAX_BURN_TIME = 180;
|
||||||
|
|
||||||
|
@ -97,12 +97,19 @@ void SolarArrayDeploymentHandler::handleStateMachine() {
|
|||||||
// This should never fail
|
// This should never fail
|
||||||
channelAlternationCd.resetTimer();
|
channelAlternationCd.resetTimer();
|
||||||
if (not fsmInfo.dryRun) {
|
if (not fsmInfo.dryRun) {
|
||||||
sa2Off();
|
if (fsmInfo.initChannel == 0) {
|
||||||
sa1On();
|
sa2Off();
|
||||||
fsmInfo.alternationDummy = true;
|
sa1On();
|
||||||
|
fsmInfo.alternationDummy = true;
|
||||||
|
} else {
|
||||||
|
sa1Off();
|
||||||
|
sa2On();
|
||||||
|
fsmInfo.alternationDummy = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
sif::info << "S/A Deployment: Burning" << std::endl;
|
sif::info << "S/A Deployment: Burning" << std::endl;
|
||||||
triggerEvent(BURN_PHASE_START, fsmInfo.burnCountdownMs, fsmInfo.dryRun);
|
triggerEvent(BURN_PHASE_START, fsmInfo.burnCountdownMs, fsmInfo.dryRun);
|
||||||
|
channelAlternationCd.resetTimer();
|
||||||
stateMachine = BURNING;
|
stateMachine = BURNING;
|
||||||
}
|
}
|
||||||
if (stateMachine == BURNING) {
|
if (stateMachine == BURNING) {
|
||||||
@ -219,7 +226,8 @@ bool SolarArrayDeploymentHandler::autonomousDeplForFile(sd::SdCard sdCard, const
|
|||||||
if (stateSwitch or firstAutonomousCycle) {
|
if (stateSwitch or firstAutonomousCycle) {
|
||||||
if (deplState == AutonomousDeplState::FIRST_BURN or
|
if (deplState == AutonomousDeplState::FIRST_BURN or
|
||||||
deplState == AutonomousDeplState::SECOND_BURN) {
|
deplState == AutonomousDeplState::SECOND_BURN) {
|
||||||
startFsmOn(config::SA_DEPL_BURN_TIME_SECS, dryRun);
|
startFsmOn(config::SA_DEPL_BURN_TIME_SECS, (config::SA_DEPL_BURN_TIME_SECS / 2) * 1000, 0,
|
||||||
|
dryRun);
|
||||||
} else if (deplState == AutonomousDeplState::WAIT or deplState == AutonomousDeplState::DONE or
|
} else if (deplState == AutonomousDeplState::WAIT or deplState == AutonomousDeplState::DONE or
|
||||||
deplState == AutonomousDeplState::INIT) {
|
deplState == AutonomousDeplState::INIT) {
|
||||||
startFsmOff();
|
startFsmOff();
|
||||||
@ -283,15 +291,19 @@ bool SolarArrayDeploymentHandler::checkMainPower(bool onOff) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SolarArrayDeploymentHandler::startFsmOn(uint32_t burnCountdownSecs, bool dryRun) {
|
bool SolarArrayDeploymentHandler::startFsmOn(uint32_t burnCountdownSecs,
|
||||||
|
uint32_t channelAlternationIntervalMs,
|
||||||
|
uint8_t initChannel, bool dryRun) {
|
||||||
if (stateMachine != StateMachine::IDLE) {
|
if (stateMachine != StateMachine::IDLE) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
channelAlternationCd.setTimeout(channelAlternationIntervalMs);
|
||||||
if (burnCountdownSecs > config::SA_DEPL_MAX_BURN_TIME) {
|
if (burnCountdownSecs > config::SA_DEPL_MAX_BURN_TIME) {
|
||||||
burnCountdownSecs = config::SA_DEPL_MAX_BURN_TIME;
|
burnCountdownSecs = config::SA_DEPL_MAX_BURN_TIME;
|
||||||
}
|
}
|
||||||
fsmInfo.dryRun = dryRun;
|
fsmInfo.dryRun = dryRun;
|
||||||
fsmInfo.burnCountdownMs = burnCountdownSecs * 1000;
|
fsmInfo.burnCountdownMs = burnCountdownSecs * 1000;
|
||||||
|
fsmInfo.initChannel = initChannel;
|
||||||
stateMachine = StateMachine::MAIN_POWER_ON;
|
stateMachine = StateMachine::MAIN_POWER_ON;
|
||||||
retryCounter = 0;
|
retryCounter = 0;
|
||||||
return true;
|
return true;
|
||||||
@ -354,8 +366,9 @@ ReturnValue_t SolarArrayDeploymentHandler::executeAction(ActionId_t actionId,
|
|||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
uint32_t burnCountdown = cmd.getBurnTime();
|
uint32_t burnCountdown = cmd.getBurnTimeSecs();
|
||||||
if (not startFsmOn(burnCountdown, cmd.isDryRun())) {
|
if (not startFsmOn(burnCountdown, cmd.getSwitchIntervalMs(), cmd.getInitChannel(),
|
||||||
|
cmd.isDryRun())) {
|
||||||
return HasActionsIF::IS_BUSY;
|
return HasActionsIF::IS_BUSY;
|
||||||
}
|
}
|
||||||
actionActive = true;
|
actionActive = true;
|
||||||
|
@ -28,16 +28,24 @@ class ManualDeploymentCommand : public SerialLinkedListAdapter<SerializeIF> {
|
|||||||
ManualDeploymentCommand() { setLinks(); }
|
ManualDeploymentCommand() { setLinks(); }
|
||||||
|
|
||||||
void setLinks() {
|
void setLinks() {
|
||||||
setStart(&burnTime);
|
setStart(&burnTimeSecs);
|
||||||
burnTime.setNext(&dryRun);
|
burnTimeSecs.setNext(&switchIntervalMs);
|
||||||
|
switchIntervalMs.setNext(&initChannel);
|
||||||
|
initChannel.setNext(&dryRun);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t getBurnTime() const { return burnTime.entry; }
|
uint32_t getBurnTimeSecs() const { return burnTimeSecs.entry; }
|
||||||
|
|
||||||
|
uint32_t getSwitchIntervalMs() const { return switchIntervalMs.entry; };
|
||||||
|
|
||||||
|
uint8_t getInitChannel() const { return initChannel.entry; };
|
||||||
|
|
||||||
bool isDryRun() const { return dryRun.entry; }
|
bool isDryRun() const { return dryRun.entry; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SerializeElement<uint32_t> burnTime;
|
SerializeElement<uint32_t> burnTimeSecs;
|
||||||
|
SerializeElement<uint32_t> switchIntervalMs;
|
||||||
|
SerializeElement<uint8_t> initChannel;
|
||||||
SerializeElement<uint8_t> dryRun;
|
SerializeElement<uint8_t> dryRun;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -50,7 +58,16 @@ class SolarArrayDeploymentHandler : public ExecutableObjectIF,
|
|||||||
public SystemObject,
|
public SystemObject,
|
||||||
public HasActionsIF {
|
public HasActionsIF {
|
||||||
public:
|
public:
|
||||||
//! Manual deployment of the solar arrays. Burn time and channels are supplied with TC parameters
|
//! Manual deployment of the solar arrays. Burn time, channel switch interval, initial
|
||||||
|
//! burn channel and dry run flag are supplied as parameters. There are following cases to
|
||||||
|
//! consider.
|
||||||
|
//!
|
||||||
|
//! - Channel switch interval greater or equal to burn time: Only burn one channel. The init
|
||||||
|
//! burn channel parameter can be used to select which channel is burned.
|
||||||
|
//! - Channel switch interval half of burn time: Burn each channel for half of the burn time.
|
||||||
|
//!
|
||||||
|
//! The dry run flag can be used to avoid actually toggling IO pins and only test the
|
||||||
|
//! application logic.
|
||||||
static constexpr DeviceCommandId_t DEPLOY_SOLAR_ARRAYS_MANUALLY = 0x05;
|
static constexpr DeviceCommandId_t DEPLOY_SOLAR_ARRAYS_MANUALLY = 0x05;
|
||||||
static constexpr DeviceCommandId_t SWITCH_OFF_DEPLOYMENT = 0x06;
|
static constexpr DeviceCommandId_t SWITCH_OFF_DEPLOYMENT = 0x06;
|
||||||
|
|
||||||
@ -119,6 +136,7 @@ class SolarArrayDeploymentHandler : public ExecutableObjectIF,
|
|||||||
// DeploymentChannels channel;
|
// DeploymentChannels channel;
|
||||||
bool dryRun;
|
bool dryRun;
|
||||||
bool alternationDummy = false;
|
bool alternationDummy = false;
|
||||||
|
uint8_t initChannel = 0;
|
||||||
uint32_t burnCountdownMs = config::SA_DEPL_MAX_BURN_TIME;
|
uint32_t burnCountdownMs = config::SA_DEPL_MAX_BURN_TIME;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -157,7 +175,8 @@ class SolarArrayDeploymentHandler : public ExecutableObjectIF,
|
|||||||
PeriodicOperationDivider opDivider = PeriodicOperationDivider(5);
|
PeriodicOperationDivider opDivider = PeriodicOperationDivider(5);
|
||||||
uint8_t retryCounter = 3;
|
uint8_t retryCounter = 3;
|
||||||
|
|
||||||
bool startFsmOn(uint32_t burnCountdownSecs, bool dryRun);
|
bool startFsmOn(uint32_t burnCountdownSecs, uint32_t channelAlternationIntervalMs,
|
||||||
|
uint8_t initChannel, bool dryRun);
|
||||||
void startFsmOff();
|
void startFsmOff();
|
||||||
|
|
||||||
void finishFsm(ReturnValue_t resultForActionHelper);
|
void finishFsm(ReturnValue_t resultForActionHelper);
|
||||||
@ -175,8 +194,9 @@ class SolarArrayDeploymentHandler : public ExecutableObjectIF,
|
|||||||
*/
|
*/
|
||||||
Countdown burnCountdown;
|
Countdown burnCountdown;
|
||||||
|
|
||||||
|
// Only initial value, new approach is to burn each channel half of the total burn time.
|
||||||
Countdown channelAlternationCd =
|
Countdown channelAlternationCd =
|
||||||
Countdown(config::SA_DEPL_CHANNEL_ALTERNATION_INTERVAL_SECS * 1000);
|
Countdown(config::LEGACY_SA_DEPL_CHANNEL_ALTERNATION_INTERVAL_SECS * 1000);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The message queue id of the component commanding an action will be stored in this variable.
|
* The message queue id of the component commanding an action will be stored in this variable.
|
||||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
|||||||
Subproject commit 2b5ad32fdd56d38e8318027b67d091d9e0ea3aba
|
Subproject commit 2f33a4393774a3d6905f2239bd72cb0c4cc2060a
|
Loading…
Reference in New Issue
Block a user