mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-06 03:50:13 +02:00
Merge pull request #272 from dalathegreat/improvement/event-uptimestamp
Improvement/event uptimestamp
This commit is contained in:
commit
df17c49578
4 changed files with 25 additions and 8 deletions
|
@ -226,8 +226,7 @@ void core_loop(void* task_time_us) {
|
|||
if (millis() - previousMillisUpdateVal >= intervalUpdateValues) // Every 5s normally
|
||||
{
|
||||
previousMillisUpdateVal = millis();
|
||||
uptime::calculateUptime(); // millis() overflows every 50 days, so update occasionally to adjust
|
||||
update_SOC(); // Check if real or calculated SOC% value should be sent
|
||||
update_SOC(); // Check if real or calculated SOC% value should be sent
|
||||
update_values(); // Update values heading towards inverter. Prepare for sending on CAN, or write directly to Modbus.
|
||||
if (DUMMY_EVENT_ENABLED) {
|
||||
set_event(EVENT_DUMMY_ERROR, (uint8_t)millis());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue