diff --git a/flight/PiOS/inc/pios_config.h b/flight/PiOS/inc/pios_config.h index 0b6f247da..06a15873c 100644 --- a/flight/PiOS/inc/pios_config.h +++ b/flight/PiOS/inc/pios_config.h @@ -28,7 +28,20 @@ #ifndef PIOS_CONFIG_H #define PIOS_CONFIG_H +/* Compile Time Macros */ +/* Defaults for MinIni */ + +/* COM Module */ +#define GPS_BAUDRATE 19200 +#define TELEM_BAUDRATE 19200 +#define AUXUART_ENABLED 0 +#define AUXUART_BAUDRATE 19200 + +/* Servos */ +#define SERVOS_POSITION_MIN 800 +#define SERVOS_POSITION_MAX 2200 + #endif /* PIOS_CONFIG_H */ diff --git a/flight/PiOS/inc/pios_settings.h b/flight/PiOS/inc/pios_settings.h index ed1384b77..9a90468a3 100644 --- a/flight/PiOS/inc/pios_settings.h +++ b/flight/PiOS/inc/pios_settings.h @@ -26,16 +26,6 @@ #ifndef PIOS_SETTINGS_H #define PIOS_SETTINGS_H -/* Default Values */ -#define GPS_BAUDRATE 19200 - -#define TELEM_BAUDRATE 19200 - -#define AUXUART_ENABLED 0 -#define AUXUART_BAUDRATE 19200 - -#define SERVOS_POSITION_MIN 800 -#define SERVOS_POSITION_MAX 2200 /* Global types */ typedef struct { diff --git a/flight/PiOS/pios.c b/flight/PiOS/pios.c index b96991936..933462bd9 100644 --- a/flight/PiOS/pios.c +++ b/flight/PiOS/pios.c @@ -51,18 +51,25 @@ static void HooksTask(void *pvParameters); */ int main() { - /* Setup Hardware */ + + /* Brings up System using CMSIS functions, + enables the LEDs and mounts the SDCard, + loads global systems settings. */ PIOS_SYS_Init(); + + /* Com ports init */ PIOS_COM_Init(); + + /* Analog to digi init */ PIOS_ADC_Init(); - /* Initialise OpenPilot */ + /* Initialise OpenPilot application */ OpenPilotInit(); /* Start the task which calls the application hooks */ xTaskCreate(HooksTask, (signed portCHAR *)"Hooks", configMINIMAL_STACK_SIZE, NULL, PRIORITY_TASK_HOOKS, NULL); - /* Start the scheduler */ + /* Start the FreeRTOS scheduler */ vTaskStartScheduler(); /* If all is well we will never reach here as the scheduler will now be running. */