dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
logging.c File Reference

Forward a set of UAVObjects when updated out a PIOS_COM port. More...

#include "openpilot.h"
#include "modulesettings.h"
#include "pios_thread.h"
#include "pios_queue.h"
#include "pios_mutex.h"
#include "uavobjectmanager.h"
#include "misc_math.h"
#include "timeutils.h"
#include "pios_streamfs.h"
#include <pios_board_info.h>
#include "accels.h"
#include "actuatorcommand.h"
#include "actuatordesired.h"
#include "airspeedactual.h"
#include "attitudeactual.h"
#include "baroaltitude.h"
#include "flightbatterystate.h"
#include "flightstatus.h"
#include "gpsposition.h"
#include "gpstime.h"
#include "gpssatellites.h"
#include "gyros.h"
#include "loggingsettings.h"
#include "loggingstats.h"
#include "magnetometer.h"
#include "manualcontrolcommand.h"
#include "positionactual.h"
#include "stabilizationdesired.h"
#include "systemalarms.h"
#include "systemident.h"
#include "velocityactual.h"
#include "waypointactive.h"
#include "rtkfestimate.h"
#include "lqgsolution.h"
#include "pios_bl_helper.h"
#include "pios_streamfs_priv.h"
#include "pios_com_priv.h"
#include <uavtalk.h>

Go to the source code of this file.

Macros

#define STACK_SIZE_BYTES   1200
 
#define TASK_PRIORITY   PIOS_THREAD_PRIO_LOW
 
#define LOGGING_PERIOD_MS   100
 
#define STR_BUF_LEN   45
 
#define LOG_HEADER   "dRonin git hash:\n"
 

Functions

static void loggingTask (void *parameters)
 
static int32_t send_data (uint8_t *data, int32_t length)
 
static int32_t send_data_nonblock (void *ctx, uint8_t *data, int32_t length)
 
static uint16_t get_minimum_logging_period ()
 
static void unregister_object (UAVObjHandle obj)
 
static void register_object (UAVObjHandle obj)
 
static void register_default_profile ()
 
static void logAll (UAVObjHandle obj)
 
static void logSettings (UAVObjHandle obj)
 
static void writeHeader ()
 
static void updateSettings ()
 
int32_t LoggingInitialize (void)
 
int32_t LoggingStart (void)
 
 MODULE_INITCALL (LoggingInitialize, LoggingStart)
 
static void obj_updated_callback (const UAVObjEvent *ev, void *cb_ctx, void *uavo_data, int uavo_len)
 Callback for adding an object to the logging queue. More...
 

Variables

const char DIGITS [16] = "0123456789abcdef"
 
static UAVTalkConnection uavTalkCon
 
static struct pios_thread * loggingTaskHandle
 
static bool module_enabled
 
static volatile LoggingSettingsData settings
 
static LoggingStatsData loggingData
 
static uintptr_t logging_com_id
 
static uint32_t written_bytes
 
static bool destination_onboard_flash
 

Detailed Description

Forward a set of UAVObjects when updated out a PIOS_COM port.

Author
Tau Labs, http://taulabs.org, Copyright (C) 2014
dRonin, http://dronin.org Copyright (C) 2015-2016
See Also
The GNU Public License (GPL) Version 3

Definition in file logging.c.

Macro Definition Documentation

#define LOG_HEADER   "dRonin git hash:\n"
#define STR_BUF_LEN   45