improvements in supervisor helper
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit

This commit is contained in:
Jakob Meier
2022-04-19 13:33:37 +02:00
parent 1ce45acba3
commit ffd64d0463
16 changed files with 310 additions and 254 deletions

View File

@ -3,7 +3,7 @@
#include "fsfw/serviceinterface/ServiceInterfaceStream.h"
ProgressPrinter::ProgressPrinter(std::string name, uint32_t numSteps, uint32_t percentageResolution)
: name(name), numSteps(numSteps) {}
: name(name), numSteps(numSteps), percentageResolution(percentageResolution) {}
ProgressPrinter::~ProgressPrinter() {}
@ -11,6 +11,6 @@ void ProgressPrinter::print(uint32_t currentStep) {
float progressInPercent = static_cast<float>(currentStep) / static_cast<float>(numSteps) * 100;
if (static_cast<uint32_t>(progressInPercent) >= nextProgressPrint) {
sif::info << name << " progress: " << progressInPercent << " %" << std::endl;
nextProgressPrint += FIVE_PERCENT;
nextProgressPrint += percentageResolution;
}
}