1
0
forked from fsfw/fsfw

Merge remote-tracking branch 'upstream/master' into mueller_FixedSequenceImprovements

This commit is contained in:
2020-05-07 20:06:17 +02:00
6 changed files with 51 additions and 29 deletions

View File

@ -7,14 +7,8 @@ FixedSlotSequence::FixedSlotSequence(uint32_t setLengthMs) :
}
FixedSlotSequence::~FixedSlotSequence() {
// This should call the destructor on each list entry.
// Call the destructor on each list entry.
slotList.clear();
// SlotListIter slotListIter = this->slotList.begin();
// //Iterate through slotList and delete all entries.
// while (slotListIter != this->slotList.end()) {
// delete (*slotIt);
// slotIt++;
// }
}
void FixedSlotSequence::executeAndAdvance() {
@ -87,8 +81,11 @@ uint32_t FixedSlotSequence::getLengthMs() const {
}
ReturnValue_t FixedSlotSequence::checkSequence() const {
// Iterate through slotList and check successful creation.
// Checks if timing is ok (must be ascending) and if all handlers were found.
if(slotList.empty()) {
error << "Fixed Slot Sequence: Slot list is empty!" << std::endl;
return HasReturnvaluesIF::RETURN_FAILED;
}
auto slotIt = slotList.begin();
uint32_t count = 0;
uint32_t time = 0;