Browse Source

AP_HAL: expose DF_LOGGING_FORMAT to user

mission-4.1.18
Pat Hickey 12 years ago committed by Andrew Tridgell
parent
commit
6218d7779f
  1. 7
      libraries/AP_HAL/Dataflash.h
  2. 7
      libraries/AP_HAL_AVR/Dataflash_common.cpp

7
libraries/AP_HAL/Dataflash.h

@ -4,6 +4,13 @@ @@ -4,6 +4,13 @@
#include "AP_HAL_Namespace.h"
// the last page holds the log format in first 4 bytes. Please change
// this if (and only if!) the low level format changes
#define DF_LOGGING_FORMAT 0x28122011
// we use an invalid logging format to test the chip erase
#define DF_LOGGING_FORMAT_INVALID 0x28122012
/* Dataflash abstract class:
* This isn't the abstraction ArduPilot needs, but it is the abstraction
* ArduPilot deserves.

7
libraries/AP_HAL_AVR/Dataflash_common.cpp

@ -9,13 +9,6 @@ extern const AP_HAL::HAL& hal; @@ -9,13 +9,6 @@ extern const AP_HAL::HAL& hal;
// 0: When reach the end page stop, 1: Start overwriting from page 1
#define DF_OVERWRITE_DATA true
// the last page holds the log format in first 4 bytes. Please change
// this if (and only if!) the low level format changes
#define DF_LOGGING_FORMAT 0x28122011
// we use an invalie logging format to test the chip erase
#define DF_LOGGING_FORMAT_INVALID 0x28122012
void CommonDataflash::erase_all() {
for (uint16_t i = 1; i <= (_num_pages+1)/8; i++) {
_block_erase(i);

Loading…
Cancel
Save