mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -04:00
AP_Radio: allow build of AP_Radio under PX4
This commit is contained in:
parent
0ed75052f8
commit
64384fa8c9
@ -152,9 +152,11 @@ bool AP_Radio::init(void)
|
||||
case RADIO_TYPE_CYRF6936:
|
||||
driver = new AP_Radio_cypress(*this);
|
||||
break;
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS
|
||||
case RADIO_TYPE_CC2500:
|
||||
driver = new AP_Radio_cc2500(*this);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -7,12 +7,10 @@
|
||||
|
||||
#pragma GCC optimize("O0")
|
||||
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS
|
||||
#ifdef HAL_RCINPUT_WITH_AP_RADIO
|
||||
|
||||
#include <AP_Math/AP_Math.h>
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
|
||||
#include <board_config.h>
|
||||
#endif
|
||||
#include "AP_Radio_cc2500.h"
|
||||
#include <utility>
|
||||
#include <stdio.h>
|
||||
@ -1085,4 +1083,4 @@ void AP_Radio_cc2500::check_fw_ack(void)
|
||||
}
|
||||
|
||||
#endif // HAL_RCINPUT_WITH_AP_RADIO
|
||||
|
||||
#endif // CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS
|
||||
|
@ -21,13 +21,8 @@
|
||||
*/
|
||||
|
||||
#include "AP_Radio_backend.h"
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
|
||||
#include <nuttx/arch.h>
|
||||
#include <systemlib/systemlib.h>
|
||||
#include <drivers/drv_hrt.h>
|
||||
#elif CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS
|
||||
#include "hal.h"
|
||||
#endif
|
||||
#include "telem_structure.h"
|
||||
#include "driver_cc2500.h"
|
||||
|
||||
@ -210,3 +205,5 @@ private:
|
||||
};
|
||||
|
||||
|
||||
#endif // CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user