Merge pull request #272 from dalathegreat/improvement/event-uptimestamp

Improvement/event uptimestamp
This commit is contained in:
Cabooman 2024-04-27 12:58:14 +02:00 committed by GitHub
commit df17c49578
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 25 additions and 8 deletions

View file

@ -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());