diff --git a/flight/libraries/inc/CoordinateConversions.h b/flight/libraries/inc/CoordinateConversions.h index f64823a43..c8a391f43 100644 --- a/flight/libraries/inc/CoordinateConversions.h +++ b/flight/libraries/inc/CoordinateConversions.h @@ -97,7 +97,7 @@ void rot_mult(float R[3][3], const float vec[3], float vec_out[3]); * @param b * @param result */ -inline void matrix_mult_3x3f(float a[3][3], float b[3][3], float result[3][3]) +static inline void matrix_mult_3x3f(float a[3][3], float b[3][3], float result[3][3]) { result[0][0] = a[0][0] * b[0][0] + a[1][0] * b[0][1] + a[2][0] * b[0][2]; result[0][1] = a[0][1] * b[0][0] + a[1][1] * b[0][1] + a[2][1] * b[0][2]; diff --git a/flight/libraries/rscode/ecc.h b/flight/libraries/rscode/ecc.h index bf56a0b9a..0a6316d8a 100644 --- a/flight/libraries/rscode/ecc.h +++ b/flight/libraries/rscode/ecc.h @@ -66,7 +66,7 @@ extern int pBytes[MAXDEG]; extern int synBytes[MAXDEG]; /* print debugging info */ -extern int DEBUG; +//extern int DEBUG; /* Reed Solomon encode/decode routines */ void initialize_ecc (void); diff --git a/flight/libraries/rscode/rs.c b/flight/libraries/rscode/rs.c index 39c014720..62fd02386 100644 --- a/flight/libraries/rscode/rs.c +++ b/flight/libraries/rscode/rs.c @@ -38,7 +38,7 @@ int synBytes[MAXDEG]; /* generator polynomial */ int genPoly[MAXDEG*2]; -int DEBUG = FALSE; +//int DEBUG = FALSE; static void compute_genpoly (int nbytes, int genpoly[]); diff --git a/flight/pios/inc/pios_debug.h b/flight/pios/inc/pios_debug.h index 8fd7016a9..4d481dfbd 100644 --- a/flight/pios/inc/pios_debug.h +++ b/flight/pios/inc/pios_debug.h @@ -58,7 +58,7 @@ void PIOS_DEBUG_PinHigh(uint8_t pin); void PIOS_DEBUG_PinLow(uint8_t pin); void PIOS_DEBUG_PinValue8Bit(uint8_t value); void PIOS_DEBUG_PinValue4BitL(uint8_t value); -void PIOS_DEBUG_Panic(const char *msg); +void PIOS_DEBUG_Panic(const char *msg) __attribute__((noreturn)); #ifdef DEBUG #define PIOS_DEBUG_Assert(test) if (!(test)) { PIOS_DEBUG_Panic(PIOS_DEBUG_AssertMsg); } diff --git a/flight/pios/osx/inc/pios_debug.h b/flight/pios/osx/inc/pios_debug.h index 1d4b88595..460bf7d0a 100644 --- a/flight/pios/osx/inc/pios_debug.h +++ b/flight/pios/osx/inc/pios_debug.h @@ -38,7 +38,7 @@ void PIOS_DEBUG_PinHigh(uint8_t pin); void PIOS_DEBUG_PinLow(uint8_t pin); void PIOS_DEBUG_PinValue8Bit(uint8_t value); void PIOS_DEBUG_PinValue4BitL(uint8_t value); -void PIOS_DEBUG_Panic(const char *msg); +void PIOS_DEBUG_Panic(const char *msg) __attribute__((noreturn)); #ifdef DEBUG #define PIOS_DEBUG_Assert(test) if (!(test)) { PIOS_DEBUG_Panic(PIOS_DEBUG_AssertMsg); } diff --git a/flight/pios/osx/osx/pios_debug.c b/flight/pios/osx/osx/pios_debug.c index 71120a39d..bb6cd0d9e 100644 --- a/flight/pios/osx/osx/pios_debug.c +++ b/flight/pios/osx/osx/pios_debug.c @@ -82,6 +82,11 @@ void PIOS_DEBUG_Panic(const char *msg) int b = 0; int a = (2 / b); b = a; + + // Stay put + while (1) { + ; + } } /** diff --git a/flight/pios/posix/pios_debug.c b/flight/pios/posix/pios_debug.c index ac67e89a0..1f79c4722 100644 --- a/flight/pios/posix/pios_debug.c +++ b/flight/pios/posix/pios_debug.c @@ -81,6 +81,11 @@ void PIOS_DEBUG_Panic(const char *msg) int b = 0; int a = (2 / b); b = a; + + // Stay put + while (1) { + ; + } } /** diff --git a/flight/pios/stm32f10x/pios_ppm_out.c b/flight/pios/stm32f10x/pios_ppm_out.c index efb6a6a6a..d47934177 100644 --- a/flight/pios/stm32f10x/pios_ppm_out.c +++ b/flight/pios/stm32f10x/pios_ppm_out.c @@ -107,7 +107,7 @@ static const struct pios_tim_callbacks tim_out_callbacks = { int32_t PIOS_PPM_Out_Init(uint32_t *ppm_out_id, const struct pios_ppm_out_cfg *cfg) { - PIOS_DEBUG_Assert(ppm_id); + PIOS_DEBUG_Assert(ppm_out_id); PIOS_DEBUG_Assert(cfg); // Allocate the device structure diff --git a/flight/pios/stm32f4xx/pios_tim.c b/flight/pios/stm32f4xx/pios_tim.c index ec72a9c6f..a5b114b0a 100644 --- a/flight/pios/stm32f4xx/pios_tim.c +++ b/flight/pios/stm32f4xx/pios_tim.c @@ -171,7 +171,7 @@ int32_t PIOS_TIM_InitChannels(uint32_t *tim_id, const struct pios_tim_channel *c */ // commented out for now as f4 starts all clocks GPIO_Init(chan->pin.gpio, &chan->pin.init); - PIOS_DEBUG_Assert(chan->remaP); + PIOS_DEBUG_Assert(chan->remap); // Second parameter should technically be PinSource but they are numerically the same GPIO_PinAFConfig(chan->pin.gpio, chan->pin.pin_source, chan->remap); diff --git a/flight/targets/boards/oplinkmini/firmware/pios_board.c b/flight/targets/boards/oplinkmini/firmware/pios_board.c index ba83a3b45..44c981f45 100644 --- a/flight/targets/boards/oplinkmini/firmware/pios_board.c +++ b/flight/targets/boards/oplinkmini/firmware/pios_board.c @@ -78,6 +78,7 @@ uint8_t *pios_uart_rx_buffer; uint8_t *pios_uart_tx_buffer; uintptr_t pios_uavo_settings_fs_id; +uintptr_t pios_user_fs_id = 0; uint8_t servo_count = 0; diff --git a/flight/targets/boards/osd/firmware/Makefile b/flight/targets/boards/osd/firmware/Makefile index 3744ee56a..928f1310b 100644 --- a/flight/targets/boards/osd/firmware/Makefile +++ b/flight/targets/boards/osd/firmware/Makefile @@ -76,6 +76,8 @@ ifndef TESTAPP SRC += $(OPUAVSYNTHDIR)/gcstelemetrystats.c SRC += $(OPUAVSYNTHDIR)/flighttelemetrystats.c SRC += $(OPUAVSYNTHDIR)/flightstatus.c + SRC += $(OPUAVSYNTHDIR)/flightmodesettings.c + SRC += $(OPUAVSYNTHDIR)/manualcontrolsettings.c SRC += $(OPUAVSYNTHDIR)/systemstats.c SRC += $(OPUAVSYNTHDIR)/systemalarms.c SRC += $(OPUAVSYNTHDIR)/systemsettings.c