APM:Libraries
Macros | Functions | Variables
DataFlash.cpp File Reference
#include "DataFlash.h"
#include "DataFlash_Backend.h"
#include "DataFlash_File.h"
#include "DataFlash_File_sd.h"
#include "DataFlash_MAVLink.h"
#include <GCS_MAVLink/GCS.h>
#include "DataFlash_Revo.h"
#include <stdio.h>
Include dependency graph for DataFlash.cpp:

Go to the source code of this file.

Macros

#define streq(x, y)   (!strcmp(x, y))
 
#define DEBUG_LOG_STRUCTURES   0
 
#define Debug(fmt, args ...)   do {hal.console->printf("%s:%d: " fmt "\n", __FUNCTION__, __LINE__, ## args); hal.scheduler->delay(1); } while(0)
 
#define CHECK_ENTRY(fieldname, fieldname_s, fieldlen)
 
#define FOR_EACH_BACKEND(methodcall)
 

Functions

static uint8_t count_commas (const char *string)
 return the number of commas present in string More...
 

Variables

const AP_HAL::HALhal
 -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- More...
 

Macro Definition Documentation

◆ CHECK_ENTRY

#define CHECK_ENTRY (   fieldname,
  fieldname_s,
  fieldlen 
)
Value:
do { \
if (strnlen(logstructure->fieldname, fieldlen) > fieldlen-1) { \
Debug("Message " fieldname_s " not NULL-terminated or too long"); \
passed = false; \
} \
} while (false)

Referenced by DataFlash_Class::validate_structure().

◆ Debug

#define Debug (   fmt,
  args ... 
)    do {hal.console->printf("%s:%d: " fmt "\n", __FUNCTION__, __LINE__, ## args); hal.scheduler->delay(1); } while(0)

◆ DEBUG_LOG_STRUCTURES

#define DEBUG_LOG_STRUCTURES   0

Definition at line 168 of file DataFlash.cpp.

◆ FOR_EACH_BACKEND

#define FOR_EACH_BACKEND (   methodcall)

◆ streq

#define streq (   x,
 
)    (!strcmp(x, y))

Definition at line 63 of file DataFlash.cpp.

Referenced by DataFlash_Class::assert_same_fmt_for_name().

Function Documentation

◆ count_commas()

static uint8_t count_commas ( const char *  string)
static

return the number of commas present in string

Definition at line 174 of file DataFlash.cpp.

Referenced by DataFlash_Class::validate_structure().

Here is the caller graph for this function:

Variable Documentation

◆ hal

const AP_HAL::HAL& hal

-*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-

The strategy for roll/pitch autotune is to give the user a AUTOTUNE flight mode which behaves just like FBWA, but does automatic tuning.

While the user is flying in AUTOTUNE the gains are saved every 10 seconds, but the saved gains are not the current gains, instead it saves the gains from 10s ago. When the user exits AUTOTUNE the gains are restored from 10s ago.

This allows the user to fly as much as they want in AUTOTUNE mode, and if they are ever unhappy they just exit the mode. If they stay in AUTOTUNE for more than 10s then their gains will have changed.

Using this approach users don't need any special switches, they just need to be able to enter and exit AUTOTUNE mode

Definition at line 170 of file DataFlash.cpp.