mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-27 02:06:27 +08:00
Integration WIP with current NuttX version
This commit is contained in:
@@ -58,7 +58,7 @@
|
||||
#include <nuttx/mmcsd.h>
|
||||
#include <nuttx/analog/adc.h>
|
||||
|
||||
#include "stm32_internal.h"
|
||||
#include "stm32.h"
|
||||
#include "px4fmu_internal.h"
|
||||
#include "stm32_uart.h"
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* these headers are not C++ safe */
|
||||
#include <stm32_internal.h>
|
||||
#include <stm32.h>
|
||||
|
||||
|
||||
/****************************************************************************************************
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "stm32_internal.h"
|
||||
#include "stm32.h"
|
||||
#include "px4fmu_internal.h"
|
||||
|
||||
#include <arch/board/board.h>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
#include <arch/board/board.h>
|
||||
#include <drivers/drv_pwm_output.h>
|
||||
|
||||
#include <stm32_internal.h>
|
||||
#include <stm32.h>
|
||||
#include <stm32_gpio.h>
|
||||
#include <stm32_tim.h>
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
#include "up_arch.h"
|
||||
#include "chip.h"
|
||||
#include "stm32_internal.h"
|
||||
#include "stm32.h"
|
||||
#include "px4fmu_internal.h"
|
||||
|
||||
/************************************************************************************
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
#include <nuttx/usb/usbdev_trace.h>
|
||||
|
||||
#include "up_arch.h"
|
||||
#include "stm32_internal.h"
|
||||
#include "stm32.h"
|
||||
#include "px4fmu_internal.h"
|
||||
|
||||
/************************************************************************************
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "stm32_internal.h"
|
||||
#include "stm32.h"
|
||||
#include "px4io_internal.h"
|
||||
#include "stm32_uart.h"
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
#include <nuttx/compiler.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <stm32_internal.h>
|
||||
#include <stm32.h>
|
||||
|
||||
/************************************************************************************
|
||||
* Definitions
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
#include <arch/board/board.h>
|
||||
#include <drivers/drv_pwm_output.h>
|
||||
|
||||
#include <stm32_internal.h>
|
||||
#include <stm32.h>
|
||||
#include <stm32_gpio.h>
|
||||
#include <stm32_tim.h>
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
#include <drivers/drv_adc.h>
|
||||
|
||||
#include <arch/stm32/chip.h>
|
||||
#include <stm32_internal.h>
|
||||
#include <stm32.h>
|
||||
#include <stm32_gpio.h>
|
||||
|
||||
#include <systemlib/err.h>
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
#include "up_internal.h"
|
||||
#include "up_arch.h"
|
||||
|
||||
#include "stm32_internal.h"
|
||||
#include "stm32.h"
|
||||
#include "stm32_gpio.h"
|
||||
#include "stm32_tim.h"
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
#include <up_internal.h>
|
||||
#include <up_arch.h>
|
||||
|
||||
#include <stm32_internal.h>
|
||||
#include <stm32.h>
|
||||
#include <stm32_gpio.h>
|
||||
#include <stm32_tim.h>
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
#include <up_internal.h>
|
||||
#include <up_arch.h>
|
||||
|
||||
#include <stm32_internal.h>
|
||||
#include <stm32.h>
|
||||
#include <stm32_gpio.h>
|
||||
#include <stm32_tim.h>
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <arch/stm32/chip.h>
|
||||
#include <stm32_internal.h>
|
||||
#include <stm32.h>
|
||||
|
||||
#include <drivers/drv_hrt.h>
|
||||
#include <systemlib/perf_counter.h>
|
||||
|
||||
@@ -42,11 +42,11 @@
|
||||
#include <float.h>
|
||||
#include <stdint.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/** Reboots the board */
|
||||
extern void up_systemreset(void) noreturn_function;
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/** Sends SIGUSR1 to all processes */
|
||||
__EXPORT void killall(void);
|
||||
|
||||
|
||||
@@ -146,6 +146,15 @@ int preflight_check_main(int argc, char *argv[])
|
||||
bool rc_ok = true;
|
||||
char nbuf[20];
|
||||
|
||||
/* first check channel mappings */
|
||||
/* check which map param applies */
|
||||
// if (map_by_channel[i] >= MAX_CONTROL_CHANNELS) {
|
||||
// mavlink_log_critical(mavlink_fd, "ERR: RC_%d_MAP >= # CHANS", i+1);
|
||||
// /* give system time to flush error message in case there are more */
|
||||
// usleep(100000);
|
||||
// count++;
|
||||
// }
|
||||
|
||||
for (int i = 0; i < 12; i++) {
|
||||
/* should the channel be enabled? */
|
||||
uint8_t count = 0;
|
||||
@@ -209,8 +218,8 @@ int preflight_check_main(int argc, char *argv[])
|
||||
count++;
|
||||
}
|
||||
|
||||
/* XXX needs inspection of all the _MAP params */
|
||||
// if (conf[PX4IO_P_RC_CONFIG_ASSIGNMENT] >= MAX_CONTROL_CHANNELS) {
|
||||
/* check which map param applies */
|
||||
// if (map_by_channel[i] >= MAX_CONTROL_CHANNELS) {
|
||||
// mavlink_log_critical(mavlink_fd, "ERR: RC_%d_MAP >= # CHANS", i+1);
|
||||
// /* give system time to flush error message in case there are more */
|
||||
// usleep(100000);
|
||||
|
||||
Reference in New Issue
Block a user