Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AP_HAL_ESP32: ADC timer tick moved into scheduler timer process #28499

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions libraries/AP_HAL_ESP32/AnalogIn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ void AnalogSource::_add_value()
*/
void AnalogIn::init()
{
hal.scheduler->register_timer_process(FUNCTOR_BIND_MEMBER(&AnalogIn::_timer_tick, void));
}

/*
Expand Down
5 changes: 0 additions & 5 deletions libraries/AP_HAL_ESP32/Scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

#include "AP_HAL_ESP32/Scheduler.h"
#include "AP_HAL_ESP32/RCInput.h"
#include "AP_HAL_ESP32/AnalogIn.h"
#include "AP_Math/AP_Math.h"
#include "SdCard.h"
#include "Profile.h"
Expand Down Expand Up @@ -318,10 +317,6 @@ void IRAM_ATTR Scheduler::_timer_thread(void *arg)
while (true) {
sched->delay_microseconds(1000);
sched->_run_timers();
//analog in
#ifndef HAL_DISABLE_ADC_DRIVER
((AnalogIn*)hal.analogin)->_timer_tick();
#endif
}
}

Expand Down
Loading