From 3fd75273f50ad39ed3e4c415ebd85130db78de5c Mon Sep 17 00:00:00 2001 From: Alessio Morale Date: Mon, 20 Apr 2015 21:56:28 +0200 Subject: [PATCH] Cleanup/uncrustify --- .../boards/revonano/firmware/inc/pios_config.h | 2 +- .../boards/revonano/firmware/pios_board.c | 8 ++++---- .../boards/revonano/firmware/revolution.cpp | 17 ----------------- flight/targets/boards/revonano/pios_board.h | 18 +++++++++--------- 4 files changed, 14 insertions(+), 31 deletions(-) diff --git a/flight/targets/boards/revonano/firmware/inc/pios_config.h b/flight/targets/boards/revonano/firmware/inc/pios_config.h index 17faaf267..d88a936ec 100644 --- a/flight/targets/boards/revonano/firmware/inc/pios_config.h +++ b/flight/targets/boards/revonano/firmware/inc/pios_config.h @@ -172,7 +172,7 @@ /* Task stack sizes */ /* #define PIOS_ACTUATOR_STACK_SIZE 1020 */ /* #define PIOS_MANUAL_STACK_SIZE 800 */ -#define PIOS_SYSTEM_STACK_SIZE 1536 +#define PIOS_SYSTEM_STACK_SIZE 1536 /* #define PIOS_STABILIZATION_STACK_SIZE 524 */ /* #define PIOS_TELEM_STACK_SIZE 500 */ /* #define PIOS_EVENTDISPATCHER_STACK_SIZE 130 */ diff --git a/flight/targets/boards/revonano/firmware/pios_board.c b/flight/targets/boards/revonano/firmware/pios_board.c index c4050a59a..413f1f70b 100644 --- a/flight/targets/boards/revonano/firmware/pios_board.c +++ b/flight/targets/boards/revonano/firmware/pios_board.c @@ -734,10 +734,10 @@ void PIOS_Board_Init(void) #ifdef PIOS_INCLUDE_ADC uint8_t adc_config[HWSETTINGS_ADCROUTING_NUMELEM]; HwSettingsADCRoutingArrayGet(adc_config); - for(uint32_t i = 0; i < HWSETTINGS_ADCROUTING_NUMELEM; i++){ - if(adc_config[i] != HWSETTINGS_ADCROUTING_DISABLED){ - PIOS_ADC_PinSetup(i); - } + for (uint32_t i = 0; i < HWSETTINGS_ADCROUTING_NUMELEM; i++) { + if (adc_config[i] != HWSETTINGS_ADCROUTING_DISABLED) { + PIOS_ADC_PinSetup(i); + } } #endif } diff --git a/flight/targets/boards/revonano/firmware/revolution.cpp b/flight/targets/boards/revonano/firmware/revolution.cpp index 268325b26..70d0b2245 100644 --- a/flight/targets/boards/revonano/firmware/revolution.cpp +++ b/flight/targets/boards/revonano/firmware/revolution.cpp @@ -41,23 +41,6 @@ extern "C" { /* Global Variables */ /* Local Variables */ -#define INCLUDE_TEST_TASKS 0 -#if INCLUDE_TEST_TASKS -static uint8_t sdcard_available; -#endif -char Buffer[1024]; -uint32_t Cache; - -/* Function Prototypes */ -#if INCLUDE_TEST_TASKS -static void TaskTick(void *pvParameters); -static void TaskTesting(void *pvParameters); -static void TaskHIDTest(void *pvParameters); -static void TaskServos(void *pvParameters); -static void TaskSDCard(void *pvParameters); -#endif -int32_t CONSOLE_Parse(uint8_t port, char c); -void OP_ADC_NotifyChange(uint32_t pin, uint32_t pin_value); /* Prototype of PIOS_Board_Init() function */ extern void PIOS_Board_Init(void); diff --git a/flight/targets/boards/revonano/pios_board.h b/flight/targets/boards/revonano/pios_board.h index 9b7dc64c8..7905ddccd 100644 --- a/flight/targets/boards/revonano/pios_board.h +++ b/flight/targets/boards/revonano/pios_board.h @@ -284,17 +284,17 @@ extern uint32_t pios_packet_handler; // ------------------------- #define PIOS_DMA_PIN_CONFIG \ { \ - { GPIOB, GPIO_Pin_1, ADC_Channel_9, false},/* FLEXI-IO PIN 4 */ \ - { GPIOB, GPIO_Pin_0, ADC_Channel_8, false},/* FLEXI-IO PIN 5 */ \ - { GPIOA, GPIO_Pin_7, ADC_Channel_7, false},/* FLEXI-IO PIN 6 */ \ - { GPIOA, GPIO_Pin_6, ADC_Channel_6, false},/* FLEXI-IO PIN 7 */ \ - { GPIOA, GPIO_Pin_5, ADC_Channel_5, false},/* FLEXI-IO PIN 8 */ \ + { GPIOB, GPIO_Pin_1, ADC_Channel_9, false }, /* FLEXI-IO PIN 4 */ \ + { GPIOB, GPIO_Pin_0, ADC_Channel_8, false }, /* FLEXI-IO PIN 5 */ \ + { GPIOA, GPIO_Pin_7, ADC_Channel_7, false }, /* FLEXI-IO PIN 6 */ \ + { GPIOA, GPIO_Pin_6, ADC_Channel_6, false }, /* FLEXI-IO PIN 7 */ \ + { GPIOA, GPIO_Pin_5, ADC_Channel_5, false }, /* FLEXI-IO PIN 8 */ \ \ - { GPIOA, GPIO_Pin_0, ADC_Channel_0, false},/* SERVO PIN 5 */ \ - { GPIOA, GPIO_Pin_1, ADC_Channel_1, false},/* SERVO PIN 6 */ \ + { GPIOA, GPIO_Pin_0, ADC_Channel_0, false }, /* SERVO PIN 5 */ \ + { GPIOA, GPIO_Pin_1, ADC_Channel_1, false }, /* SERVO PIN 6 */ \ \ - { NULL, 0, ADC_Channel_Vrefint, false}, /* Voltage reference */ \ - { NULL, 0, ADC_Channel_TempSensor, false}, /* Temperature sensor */ \ + { NULL, 0, ADC_Channel_Vrefint, false }, /* Voltage reference */ \ + { NULL, 0, ADC_Channel_TempSensor, false }, /* Temperature sensor */ \ } /* we have to do all this to satisfy the PIOS_ADC_MAX_SAMPLES define in pios_adc.h */