diff --git a/flight/OpenPilot/Modules/AHRSComms/ahrs_comms.c b/flight/OpenPilot/Modules/AHRSComms/ahrs_comms.c index b64bffad3..20d6b363a 100644 --- a/flight/OpenPilot/Modules/AHRSComms/ahrs_comms.c +++ b/flight/OpenPilot/Modules/AHRSComms/ahrs_comms.c @@ -54,6 +54,18 @@ #include "pios_opahrs.h" // library for OpenPilot AHRS access functions #include "pios_opahrs_proto.h" +/** + * @addtogroup OpenPilotModules OpenPilot Modules + * @{ + */ + +/** + * @addtogroup AHRSCommsModule AHRSComms Module + * @brief Handles communication with AHRS and updating position + * Specifically updates the the AttitudeActual and HeadingActual settings objects + * @{ + */ + // Private constants #define STACK_SIZE 400 #define TASK_PRIORITY (tskIDLE_PRIORITY+4) diff --git a/flight/OpenPilot/Modules/Actuator/actuator.c b/flight/OpenPilot/Modules/Actuator/actuator.c index 000af5ea6..4c0ded0d4 100644 --- a/flight/OpenPilot/Modules/Actuator/actuator.c +++ b/flight/OpenPilot/Modules/Actuator/actuator.c @@ -24,6 +24,17 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/** + * @addtogroup OpenPilotModules OpenPilot Modules + * @{ + */ + +/** + * @addtogroup ActuatorModule Actuator Module + * @brief Compute servo/motor settings based on desired actuator positions and aircraft type + * @{ + */ + #include "openpilot.h" #include "actuator.h" #include "actuatorsettings.h" @@ -52,7 +63,8 @@ static int16_t scaleChannel(float value, int16_t max, int16_t min, int16_t neutr static void setFailsafe(); /** - * Module initialization + * @brief Module initialization + * @return 0 */ int32_t ActuatorInitialize() { @@ -69,7 +81,7 @@ int32_t ActuatorInitialize() } /** - * Main module task + * @brief Main module task */ static void actuatorTask(void* parameters) { @@ -157,7 +169,7 @@ static void actuatorTask(void* parameters) /** * Mixer for Fixed Wing airframes. Converts desired roll,pitch,yaw and throttle to servo outputs. - * @return -1 if error, 0 if success + * @return -1 if error, 0 if success */ static int32_t mixerFixedWing(const ActuatorSettingsData* settings, const ActuatorDesiredData* desired, ActuatorCommandData* cmd) { @@ -229,7 +241,7 @@ static int32_t mixerVTOL(const ActuatorSettingsData* settings, const ActuatorDes } /** - * Convert channel from -1/+1 to servo pulse duration in microseconds + * Convert channel from -1/+1 to servo pulse duration in microseconds */ static int16_t scaleChannel(float value, int16_t max, int16_t min, int16_t neutral) { @@ -247,7 +259,7 @@ static int16_t scaleChannel(float value, int16_t max, int16_t min, int16_t neutr } /** - * Set actuator output to the neutral values (failsafe) + * Set actuator output to the neutral values (failsafe) */ static void setFailsafe() { @@ -275,3 +287,11 @@ static void setFailsafe() // Update output object ActuatorCommandSet(&cmd); } + +/** + * @} + */ + +/** + * @} + */ diff --git a/flight/OpenPilot/Modules/Altitude/altitude.c b/flight/OpenPilot/Modules/Altitude/altitude.c index 222a03fd2..619e80f5a 100644 --- a/flight/OpenPilot/Modules/Altitude/altitude.c +++ b/flight/OpenPilot/Modules/Altitude/altitude.c @@ -34,6 +34,17 @@ #include "openpilot.h" #include "altitudeactual.h" // object that will be updated by the module +/** + * @addtogroup OpenPilotModules OpenPilot Modules + * @{ + */ + +/** + * @addtogroup AltitudeModule Altitude Module + * @brief Communicate with BMP085 and update AltitudeActual + * @{ + */ + // Private constants #define STACK_SIZE configMINIMAL_STACK_SIZE #define TASK_PRIORITY (tskIDLE_PRIORITY+3) @@ -105,3 +116,11 @@ static void altitudeTask(void* parameters) vTaskDelayUntil(&lastSysTime, UPDATE_PERIOD / portTICK_RATE_MS ); } } + +/** + * @} + */ + +/** + * @} + */ \ No newline at end of file diff --git a/flight/OpenPilot/Modules/Altitude/inc/altitude.h b/flight/OpenPilot/Modules/Altitude/inc/altitude.h index 366f0cf8e..c17d87141 100644 --- a/flight/OpenPilot/Modules/Altitude/inc/altitude.h +++ b/flight/OpenPilot/Modules/Altitude/inc/altitude.h @@ -26,7 +26,27 @@ #ifndef ALTITUDE_H #define ALTITUDE_H +/** + * @addtogroup OpenPilotModules OpenPilot Modules + * @{ + */ + +/** + * @addtogroup AltitudeModule Altitude Module + * @brief Communicate with BMP085 and update AltitudeActual + * @{ + */ + int32_t AltitudeInitialize(); + +/** + * @} + */ + +/** + * @} + */ + #endif // ALTITUDE_H diff --git a/flight/OpenPilot/Modules/Battery/battery.c b/flight/OpenPilot/Modules/Battery/battery.c index afa2f1f85..09ed0b60a 100644 --- a/flight/OpenPilot/Modules/Battery/battery.c +++ b/flight/OpenPilot/Modules/Battery/battery.c @@ -43,6 +43,19 @@ #include "flightbatterystate.h" + +/** + * @addtogroup OpenPilotModules OpenPilot Modules + * @{ + */ + +/** + * @addtogroup BatteryModule Battery Module + * @brief Measures battery voltage and current + * Updates the FlightBatteryState object + * @{ + */ + // // Configuration // @@ -116,3 +129,11 @@ static void task(void* parameters) vTaskDelayUntil(&lastSysTime, SAMPLE_PERIOD_MS / portTICK_RATE_MS); } } + +/** + * @} + */ + +/** + * @} + */ diff --git a/flight/OpenPilot/Modules/GPS/GPS.c b/flight/OpenPilot/Modules/GPS/GPS.c index 5d20de245..3e2cdf065 100644 --- a/flight/OpenPilot/Modules/GPS/GPS.c +++ b/flight/OpenPilot/Modules/GPS/GPS.c @@ -28,6 +28,17 @@ #include "GPS.h" #include "positionactual.h" +/** + * @addtogroup OpenPilotModules OpenPilot Modules + * @{ + */ + +/** + * @addtogroup GSPModule GPS Module + * @brief Process GPS information + * @{ + */ + // constants/macros/typdefs #define NMEA_BUFFERSIZE 128 @@ -712,4 +723,10 @@ void nmeaProcessGPGSA(char* packet) } +/** + * @} + */ +/** + * @} + */ diff --git a/flight/OpenPilot/Modules/GPS/buffer.c b/flight/OpenPilot/Modules/GPS/buffer.c index 9fe0e4197..01fa05151 100644 --- a/flight/OpenPilot/Modules/GPS/buffer.c +++ b/flight/OpenPilot/Modules/GPS/buffer.c @@ -46,6 +46,17 @@ #include "buffer.h" +/** + * @addtogroup OpenPilotModules OpenPilot Modules + * @{ + */ + +/** + * @addtogroup GSPModule GPS Module + * @brief Process GPS information + * @{ + */ + // global variables // initialization @@ -137,3 +148,10 @@ void bufferFlush(cBuffer* buffer) buffer->datalength = 0; } +/** + * @} + */ + +/** + * @} + */ diff --git a/flight/OpenPilot/Modules/MK/MKSerial/MKSerial.c b/flight/OpenPilot/Modules/MK/MKSerial/MKSerial.c index 2a6f89d67..37a668dcf 100644 --- a/flight/OpenPilot/Modules/MK/MKSerial/MKSerial.c +++ b/flight/OpenPilot/Modules/MK/MKSerial/MKSerial.c @@ -31,6 +31,17 @@ #include "flightbatterystate.h" +/** + * @addtogroup OpenPilotModules OpenPilot Modules + * @{ + */ + +/** + * @addtogroup MKSerialModule MK Serial Control Module + * @brief Connect to MK module + * @{ + */ + // // Configuration @@ -612,3 +623,11 @@ int32_t MKSerialInitialize(void) return 0; } + +/** + * @} + */ + +/** + * @} + */ diff --git a/flight/OpenPilot/Modules/ManualControl/manualcontrol.c b/flight/OpenPilot/Modules/ManualControl/manualcontrol.c index 72742b8e1..b2bf9d96f 100644 --- a/flight/OpenPilot/Modules/ManualControl/manualcontrol.c +++ b/flight/OpenPilot/Modules/ManualControl/manualcontrol.c @@ -32,6 +32,22 @@ #include "actuatordesired.h" #include "attitudedesired.h" +/** + * @addtogroup OpenPilotModules OpenPilot Modules + * @{ + */ + +/** + * @addtogroup ManualControlModule Manual Control Module + * @brief Provide manual control or allow it alter flight mode + * + * Reads in the ManualControlCommand FlightMode setting from receiver then either + * pass the settings straght to ActuatorDesired object (manual mode) or to + * AttitudeDesired object (stabilized mode) + * @{ + */ + + // Private constants #define STACK_SIZE configMINIMAL_STACK_SIZE #define TASK_PRIORITY (tskIDLE_PRIORITY+4) @@ -49,7 +65,7 @@ static void manualControlTask(void* parameters); static float scaleChannel(int16_t value, int16_t max, int16_t min, int16_t neutral); /** - * Module initialization + * Module initialization */ int32_t ManualControlInitialize() { @@ -60,7 +76,7 @@ int32_t ManualControlInitialize() } /** - * Module task + * Module task */ static void manualControlTask(void* parameters) { diff --git a/flight/OpenPilot/Modules/Osd/OsdEtStd/OsdEtStd.c b/flight/OpenPilot/Modules/Osd/OsdEtStd/OsdEtStd.c index dc647986d..a334ef494 100644 --- a/flight/OpenPilot/Modules/Osd/OsdEtStd/OsdEtStd.c +++ b/flight/OpenPilot/Modules/Osd/OsdEtStd/OsdEtStd.c @@ -28,6 +28,17 @@ #include "flightbatterystate.h" #include "positionactual.h" +/** + * @addtogroup OpenPilotModules OpenPilot Modules + * @{ + */ + +/** + * @addtogroup OSDModule OSD Module + * @brief On screen display support + * @{ + */ + // diff --git a/flight/OpenPilot/Modules/Stabilization/stabilization.c b/flight/OpenPilot/Modules/Stabilization/stabilization.c index 0bf83448c..77137e9a4 100644 --- a/flight/OpenPilot/Modules/Stabilization/stabilization.c +++ b/flight/OpenPilot/Modules/Stabilization/stabilization.c @@ -33,6 +33,18 @@ #include "manualcontrolcommand.h" #include "systemsettings.h" +/** + * @addtogroup OpenPilotModules OpenPilot Modules + * @{ + */ + +/** + * @addtogroup StabilizationModule Stabilization Module + * @brief Stabilization PID loops in an airframe type independent manner + * @{ + */ + + // Private constants #define STACK_SIZE configMINIMAL_STACK_SIZE #define TASK_PRIORITY (tskIDLE_PRIORITY+4) @@ -164,7 +176,7 @@ static void stabilizationTask(void* parameters) } /** - * Bound input value between limits + * Bound input value between limits */ static float bound(float val, float min, float max) { @@ -178,3 +190,11 @@ static float bound(float val, float min, float max) } return val; } + +/** + * @} + */ + +/** + * @} + */ diff --git a/flight/OpenPilot/Modules/System/systemmod.c b/flight/OpenPilot/Modules/System/systemmod.c index d2fa49a5a..b4685c7b3 100644 --- a/flight/OpenPilot/Modules/System/systemmod.c +++ b/flight/OpenPilot/Modules/System/systemmod.c @@ -29,6 +29,21 @@ #include "objectpersistence.h" #include "systemstats.h" + +/** + * @addtogroup OpenPilotModules OpenPilot Modules + * @{ + */ + +/** + * @addtogroup SystemModule Main System Module + * @brief Initializes PIOS and other modules runs monitoring + * After initializing all the modules (currently selected by Makefile but in + * future controlled by configuration on SD card) runs basic monitoring and + * alarms. + * @{ + */ + // Private constants #define SYSTEM_UPDATE_PERIOD_MS 1000 #define IDLE_COUNTS_PER_SEC_AT_NO_LOAD 995998 // calibrated by running tests/test_cpuload.c @@ -317,3 +332,10 @@ void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed portCHAR *pcTask stackOverflow = 1; } +/** + * @} + */ + +/** + * @} + */ \ No newline at end of file diff --git a/flight/OpenPilot/Modules/Telemetry/telemetry.c b/flight/OpenPilot/Modules/Telemetry/telemetry.c index 0cbc05daa..5b54ce787 100644 --- a/flight/OpenPilot/Modules/Telemetry/telemetry.c +++ b/flight/OpenPilot/Modules/Telemetry/telemetry.c @@ -28,6 +28,20 @@ #include "gcstelemetrystats.h" #include "telemetrysettings.h" + +/** + * @addtogroup OpenPilotModules OpenPilot Modules + * @{ + */ + +/** + * @addtogroup TelemetryModule Telemetry Module + * @brief Main telemetry module + * Starts three tasks (RX, TX, and priority TX) that watch event queues + * and handle all the telemetry of the UAVobjects + * @{ + */ + // Set this to 1 to enable telemetry via the USB HID interface #define ALLOW_HID_TELEMETRY 0 @@ -551,3 +565,10 @@ static void updateSettings() } } +/** + * @} + */ + +/** + * @} + */