mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-06 19:00:27 +08:00
HAL_ChibiOS: update ppm to use Extended ICU driver
This commit is contained in:
committed by
Andrew Tridgell
parent
6d8d8630bc
commit
445ba6ed39
@@ -30,8 +30,8 @@ using namespace ChibiOS;
|
||||
extern const AP_HAL::HAL& hal;
|
||||
void RCInput::init()
|
||||
{
|
||||
#if HAL_USE_ICU == TRUE
|
||||
ppm_init(1000000, true);
|
||||
#if HAL_USE_EICU == TRUE
|
||||
ppm_init(1000000, false);
|
||||
#endif
|
||||
chMtxObjectInit(&rcin_mutex);
|
||||
_init = true;
|
||||
@@ -166,7 +166,7 @@ void RCInput::_timer_tick(void)
|
||||
if (!_init) {
|
||||
return;
|
||||
}
|
||||
#if HAL_USE_ICU == TRUE
|
||||
#if HAL_USE_EICU == TRUE
|
||||
if (ppm_available()) {
|
||||
chMtxLock(&rcin_mutex);
|
||||
_num_channels = ppm_read_bulk(_rc_values, RC_INPUT_MAX_CHANNELS);
|
||||
|
||||
Reference in New Issue
Block a user