DataFlash: fixed example build

This commit is contained in:
Andrew Tridgell 2013-12-17 11:51:12 +11:00
parent 81fc11cab7
commit 0641159660
1 changed files with 2 additions and 4 deletions

View File

@ -62,7 +62,7 @@ static uint16_t log_num;
void setup()
{
DataFlash.Init(); // DataFlash initialization
DataFlash.Init(log_structure, sizeof(log_structure)/sizeof(log_structure[0]));
hal.console->println("Dataflash Log Test 1.0");
@ -79,7 +79,7 @@ void setup()
// We start to write some info (sequentialy) starting from page 1
// This is similar to what we will do...
log_num = DataFlash.StartNewLog(sizeof(log_structure)/sizeof(log_structure[0]), log_structure);
log_num = DataFlash.StartNewLog();
hal.console->printf("Using log number %u\n", log_num);
hal.console->println("After testing perform erase before using DataFlash for logging!");
hal.console->println("");
@ -126,8 +126,6 @@ void loop()
DataFlash.get_log_boundaries(log_num, start, end);
DataFlash.LogReadProcess(log_num, start, end,
sizeof(log_structure)/sizeof(log_structure[0]),
log_structure,
print_mode,
hal.console);
hal.console->printf("\nTest complete. Test will repeat in 20 seconds\n");