mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-25 23:46:04 +08:00
removed hardcoded booz2_autopilot_on_rc_frame handler
This commit is contained in:
@@ -23,7 +23,6 @@
|
||||
|
||||
#include "booz_radio_control.h"
|
||||
#include "booz_radio_control_spektrum_arch.h"
|
||||
#include "booz2_autopilot.h"
|
||||
|
||||
bool_t rc_spk_parser_status;
|
||||
uint8_t rc_spk_parser_idx;
|
||||
@@ -35,9 +34,6 @@ void radio_control_impl_init(void) {
|
||||
rc_spk_parser_idx = 0;
|
||||
}
|
||||
|
||||
void RadioControlEventImp(void) {
|
||||
_RadioControlEvent(booz2_autopilot_on_rc_frame);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ extern const int16_t rc_spk_throw[RADIO_CONTROL_NB_CHANNEL];
|
||||
#define RcLinkChAvailable() RcLink(ChAvailable())
|
||||
#define RcLinkGetCh() RcLink(Getch())
|
||||
|
||||
#define _RadioControlEvent(_received_frame_handler) { \
|
||||
#define RadioControlEventImpl(_received_frame_handler) { \
|
||||
while (RcLinkChAvailable()) { \
|
||||
int8_t c = RcLinkGetCh(); \
|
||||
switch (rc_spk_parser_status) { \
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include "uart.h"
|
||||
#include "booz_radio_control.h"
|
||||
#include "booz_radio_control_spektrum_arch.h"
|
||||
#include "booz2_autopilot.h"
|
||||
|
||||
bool_t rc_spk_parser_status;
|
||||
uint8_t rc_spk_parser_idx;
|
||||
@@ -187,9 +186,4 @@ void radio_control_impl_init(void) {
|
||||
rc_spk_parser_idx = 0;
|
||||
}
|
||||
|
||||
void RadioControlEventImp(void) {
|
||||
_RadioControlEvent(booz2_autopilot_on_rc_frame);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ extern const int16_t rc_spk_throw[RADIO_CONTROL_NB_CHANNEL];
|
||||
#define RcLinkChAvailable() RcLink(ChAvailable())
|
||||
#define RcLinkGetCh() RcLink(Getch())
|
||||
|
||||
#define _RadioControlEvent(_received_frame_handler) { \
|
||||
#define RadioControlEventImp(_received_frame_handler) { \
|
||||
while (RcLinkChAvailable()) { \
|
||||
int8_t c = RcLinkGetCh(); \
|
||||
switch (rc_spk_parser_status) { \
|
||||
|
||||
@@ -30,9 +30,9 @@ extern void radio_control_spektrum_try_bind(void);
|
||||
|
||||
#include RADIO_CONTROL_SPEKTRUM_MODEL_H
|
||||
|
||||
#include "radio_control/booz_radio_control_spektrum_arch.h"
|
||||
/* implemented in booz/arch/xxx/radio_control/booz_radio_control_spektrum_arch.c */
|
||||
extern void RadioControlEventImp(void);
|
||||
|
||||
#define RadioControlEvent(_received_frame_handler) RadioControlEventImp()
|
||||
#define RadioControlEvent(_received_frame_handler) RadioControlEventImp(_received_frame_handler)
|
||||
|
||||
#endif /* BOOZ_RADIO_CONTROL_SPEKTRUM_H */
|
||||
|
||||
Reference in New Issue
Block a user