From fd750ffb2cba703399d552676ee2d0a4cb2235df Mon Sep 17 00:00:00 2001 From: Boisy Pitre Date: Sun, 15 Sep 2024 10:40:24 -0500 Subject: [PATCH] Renamed onTimer because it's a global and conflicts. --- lib/bus/drivewire/drivewire.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/bus/drivewire/drivewire.cpp b/lib/bus/drivewire/drivewire.cpp index 02c730de7..08ec470f8 100755 --- a/lib/bus/drivewire/drivewire.cpp +++ b/lib/bus/drivewire/drivewire.cpp @@ -53,7 +53,7 @@ static void IRAM_ATTR drivewire_isr_handler(void *arg) * Static callback function for the DriveWire state machine. */ #ifdef ESP_PLATFORM -void onTimer(void *info) +void onDriveWireStateMachineTimer(void *info) { systemBus *parent = (systemBus *)info; parent->resetState(); @@ -68,7 +68,7 @@ void systemBus::timer_start() #ifdef ESP_PLATFORM esp_timer_create_args_t tcfg; tcfg.arg = this; - tcfg.callback = onTimer; + tcfg.callback = onDriveWireStateMachineTimer; tcfg.dispatch_method = esp_timer_dispatch_t::ESP_TIMER_TASK; tcfg.name = nullptr; esp_timer_create(&tcfg, &stateMachineRecoveryTimerHandle); @@ -948,7 +948,7 @@ void systemBus::service() #ifdef ESP_PLATFORM #else uint64_t ms = fnSystem.millis(); -#if 0 +#ifdef SUPER_DEBUGGING if (ms % 100 == 0) { Debug_printv("MS = %ld, lastInterruptMs = %ld, TIMER = %ld\n", ms, lastInterruptMs, (timerActive == true && ms - lastInterruptMs >= timerRate)); } @@ -960,6 +960,7 @@ void systemBus::service() } #endif +#ifdef SUPER_DEBUGING if (gotNewData == 1 && showDump == 1 && serialBuffer.size() > 0) { for (int i = 0; i < serialBuffer.size(); i++) @@ -969,7 +970,8 @@ void systemBus::service() Debug_printf("=====================================\n"); } - +#endif + if (gotNewData == 1) { int bytesConsumed = 0;