Skip to content

Commit

Permalink
Renamed onTimer because it's a global and conflicts.
Browse files Browse the repository at this point in the history
  • Loading branch information
Boisy Pitre authored and dillera committed Sep 15, 2024
1 parent 7a0f211 commit fd750ff
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/bus/drivewire/drivewire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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);
Expand Down Expand Up @@ -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));
}
Expand All @@ -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++)
Expand All @@ -969,7 +970,8 @@ void systemBus::service()

Debug_printf("=====================================\n");
}

#endif

if (gotNewData == 1)
{
int bytesConsumed = 0;
Expand Down

0 comments on commit fd750ff

Please sign in to comment.