dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Stats Module

Files

file  flightstatsmodule.c
 Collects statistcs during the flight.
 

Macros

#define STACK_SIZE_BYTES   600
 
#define TASK_PRIORITY   PIOS_THREAD_PRIO_LOW
 

Functions

static void flightStatsTask (void *parameters)
 
static bool isArmed ()
 
static void resetStats (FlightStatsData *stats)
 
static void collectStats (FlightStatsData *stats)
 
int32_t FlightStatsModuleInitialize (void)
 
int32_t FlightStatModuleStart (void)
 
 MODULE_INITCALL (FlightStatsModuleInitialize, FlightStatModuleStart)
 

Variables

static bool module_enabled
 
static struct pios_thread * flightStatsTaskHandle
 
static volatile
FlightStatsSettingsData 
settings
 
static PositionActualData lastPositionActual
 
static float initial_consumed_energy
 
static float previous_consumed_energy
 

Detailed Description

Macro Definition Documentation

#define STACK_SIZE_BYTES   600

Definition at line 46 of file flightstatsmodule.c.

#define TASK_PRIORITY   PIOS_THREAD_PRIO_LOW

Definition at line 47 of file flightstatsmodule.c.

Function Documentation

static void collectStats ( FlightStatsData *  stats)
static

Collect the statistics

Definition at line 215 of file flightstatsmodule.c.

int32_t FlightStatModuleStart ( void  )

Start the FlightStats module

Returns
-1 if initialization failed
0 on success

Definition at line 107 of file flightstatsmodule.c.

int32_t FlightStatsModuleInitialize ( void  )

Initialize the FlightStats module

Returns
-1 if initialisation failed
0 on success

Definition at line 74 of file flightstatsmodule.c.

static void flightStatsTask ( void *  parameters)
static

Definition at line 124 of file flightstatsmodule.c.

static bool isArmed ( )
static

Check whether FC is armed

Returns
true if armed

Definition at line 196 of file flightstatsmodule.c.

MODULE_INITCALL ( FlightStatsModuleInitialize  ,
FlightStatModuleStart   
)
static void resetStats ( FlightStatsData *  stats)
static

Reset the statistics

Definition at line 206 of file flightstatsmodule.c.

Variable Documentation

struct pios_thread* flightStatsTaskHandle
static

Definition at line 53 of file flightstatsmodule.c.

float initial_consumed_energy
static

Definition at line 56 of file flightstatsmodule.c.

PositionActualData lastPositionActual
static

Definition at line 55 of file flightstatsmodule.c.

bool module_enabled
static

Definition at line 52 of file flightstatsmodule.c.

float previous_consumed_energy
static

Definition at line 57 of file flightstatsmodule.c.

volatile FlightStatsSettingsData settings
static

Definition at line 54 of file flightstatsmodule.c.