mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-30 03:27:33 +08:00
[nps] fix time: initialize sys_time by adding missing PERIPHERALS_AUTO_INIT
This commit is contained in:
@@ -57,7 +57,7 @@ nps.srcs += $(NPSDIR)/nps_main.c \
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
nps.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
|
nps.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) -DPERIPHERALS_AUTO_INIT
|
||||||
|
|
||||||
nps.srcs += firmwares/rotorcraft/main.c
|
nps.srcs += firmwares/rotorcraft/main.c
|
||||||
nps.srcs += mcu.c
|
nps.srcs += mcu.c
|
||||||
|
|||||||
@@ -141,6 +141,8 @@ void mcu_init(void) {
|
|||||||
#ifdef USE_DAC
|
#ifdef USE_DAC
|
||||||
dac_init();
|
dac_init();
|
||||||
#endif
|
#endif
|
||||||
|
#else
|
||||||
|
#pragma message "Info: Not auto-initializing mcu peripherals including sys_time"
|
||||||
#endif /* PERIPHERALS_AUTO_INIT */
|
#endif /* PERIPHERALS_AUTO_INIT */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,6 +122,7 @@ static void nps_main_init(void) {
|
|||||||
nps_ivy_init(nps_main.ivy_bus);
|
nps_ivy_init(nps_main.ivy_bus);
|
||||||
nps_fdm_init(SIM_DT);
|
nps_fdm_init(SIM_DT);
|
||||||
nps_sensors_init(nps_main.sim_time);
|
nps_sensors_init(nps_main.sim_time);
|
||||||
|
printf("Simulating with dt of %f\n", SIM_DT);
|
||||||
|
|
||||||
enum NpsRadioControlType rc_type;
|
enum NpsRadioControlType rc_type;
|
||||||
char* rc_dev = NULL;
|
char* rc_dev = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user