From 063e24c7239484b4ddced0da40a80f575d5c8e61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Petra=C5=A1inovi=C4=87?= Date: Tue, 30 Nov 2021 10:57:23 +0100 Subject: [PATCH] Copter: fix userhook aux switches Functions userhook_auxSwitch1, userhook_auxSwitch2, and userhook_auxSwitch3 had the wrong argument type resulting in a compilation error. --- ArduCopter/Copter.h | 6 +++--- ArduCopter/UserCode.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ArduCopter/Copter.h b/ArduCopter/Copter.h index 4385641a15..1a3c5a046c 100644 --- a/ArduCopter/Copter.h +++ b/ArduCopter/Copter.h @@ -901,9 +901,9 @@ private: void userhook_MediumLoop(); void userhook_SlowLoop(); void userhook_SuperSlowLoop(); - void userhook_auxSwitch1(uint8_t ch_flag); - void userhook_auxSwitch2(uint8_t ch_flag); - void userhook_auxSwitch3(uint8_t ch_flag); + void userhook_auxSwitch1(const RC_Channel::AuxSwitchPos ch_flag); + void userhook_auxSwitch2(const RC_Channel::AuxSwitchPos ch_flag); + void userhook_auxSwitch3(const RC_Channel::AuxSwitchPos ch_flag); // vehicle specific waypoint info helpers bool get_wp_distance_m(float &distance) const override; diff --git a/ArduCopter/UserCode.cpp b/ArduCopter/UserCode.cpp index 46070d47fa..1fc9824fdc 100644 --- a/ArduCopter/UserCode.cpp +++ b/ArduCopter/UserCode.cpp @@ -44,17 +44,17 @@ void Copter::userhook_SuperSlowLoop() #endif #ifdef USERHOOK_AUXSWITCH -void Copter::userhook_auxSwitch1(uint8_t ch_flag) +void Copter::userhook_auxSwitch1(const RC_Channel::AuxSwitchPos ch_flag) { // put your aux switch #1 handler here (CHx_OPT = 47) } -void Copter::userhook_auxSwitch2(uint8_t ch_flag) +void Copter::userhook_auxSwitch2(const RC_Channel::AuxSwitchPos ch_flag) { // put your aux switch #2 handler here (CHx_OPT = 48) } -void Copter::userhook_auxSwitch3(uint8_t ch_flag) +void Copter::userhook_auxSwitch3(const RC_Channel::AuxSwitchPos ch_flag) { // put your aux switch #3 handler here (CHx_OPT = 49) }