mirror of
https://github.com/xoseperez/espurna.git
synced 2026-03-14 04:07:08 +01:00
system: refactoring & delays clean-up
- BREAKING replace loadavg and system check from millis to seconds
- implement all available system clocks, make sure it is correctly
scaled with the origin type
- fix duration::{millis(),ccount(),seconds()} and return a respective
clock's time_point instead of duration. just like led sources, make
sure every module stores timestamps as time_point and intervals as
duration
- no need to track millis overflow on top of existing overflow counter
of the micros64 in getUptime
- remove class overhead in led static delays conversion, just try to
inline the required calculations and use NAME as unique id
also fix some non-apparent issues with heartbeat
- allow zero interval when it is also Mode::Once
- iterating runners to find the interval might return zero
This commit is contained in:
@@ -240,7 +240,7 @@ extern "C" void custom_crash_callback(struct rst_info * rst_info, uint32_t stack
|
||||
}
|
||||
|
||||
// Do not record crash data when doing a normal reboot or when crash trace was disabled
|
||||
if (checkNeedsReset()) {
|
||||
if (pendingDeferredReset()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -297,7 +297,7 @@ void crashDump(Print& print) {
|
||||
}
|
||||
|
||||
void crashResetReason(Print& print) {
|
||||
auto reason = customResetReason();
|
||||
const auto reason = customResetReason();
|
||||
bool custom { CustomResetReason::None != reason };
|
||||
print.printf_P(PSTR("last reset reason: %s\n"), custom
|
||||
? customResetReasonToPayload(reason).c_str()
|
||||
|
||||
Reference in New Issue
Block a user