Periodic Operation Divider #196

Closed
opened 2020-09-10 19:56:46 +02:00 by muellerr · 0 comments
Owner

I need a construction like that a lot

if(counter == 20) {
        sif::info << "ThermalSensorHandler::interpretDeviceReply: Measure "
        			"resistance is " << rtdValue << " Ohms." << std::endl;
        sif::info << "ThermalSensorHandler::interpretDeviceReply: Approximated"
        			" temperature is " << approxTemp << " C" << std::endl;
        counter = 0;
}
counter ++;

Mostly during debugging because I don't want spam, but sometimes also in actual mission code to reduce the frequency of a certain function.
It is actually quite generic, so I think a helper would be really useful.

I need a construction like that a lot ```cpp if(counter == 20) { sif::info << "ThermalSensorHandler::interpretDeviceReply: Measure " "resistance is " << rtdValue << " Ohms." << std::endl; sif::info << "ThermalSensorHandler::interpretDeviceReply: Approximated" " temperature is " << approxTemp << " C" << std::endl; counter = 0; } counter ++; ``` Mostly during debugging because I don't want spam, but sometimes also in actual mission code to reduce the frequency of a certain function. It is actually quite generic, so I think a helper would be really useful.
muellerr added the
feature
label 2020-09-10 19:56:46 +02:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: fsfw/fsfw#196
No description provided.