DataFlash: correct dataflash examples

This commit is contained in:
Peter Barker 2017-06-11 22:32:49 +10:00 committed by Francisco Ferreira
parent 6d1f42d1c5
commit b5029aad4f
2 changed files with 5 additions and 3 deletions

View File

@ -94,7 +94,7 @@ void DataFlashTest_AllTypes::flush_dataflash(DataFlash_Class &_dataflash)
void DataFlashTest_AllTypes::Log_Write_TypeMessages() void DataFlashTest_AllTypes::Log_Write_TypeMessages()
{ {
dataflash.StartNewLog(); dataflash.StartUnstartedLogging();
log_num = dataflash.find_last_log(); log_num = dataflash.find_last_log();
hal.console->printf("Using log number %u\n", log_num); hal.console->printf("Using log number %u\n", log_num);
@ -141,7 +141,7 @@ void DataFlashTest_AllTypes::Log_Write_TypeMessages()
void DataFlashTest_AllTypes::Log_Write_TypeMessages_Log_Write() void DataFlashTest_AllTypes::Log_Write_TypeMessages_Log_Write()
{ {
dataflash.StartNewLog(); dataflash.StartUnstartedLogging();
log_num = dataflash.find_last_log(); log_num = dataflash.find_last_log();
hal.console->printf("Using log number for Log_Write %u\n", log_num); hal.console->printf("Using log number for Log_Write %u\n", log_num);
@ -184,6 +184,7 @@ void DataFlashTest_AllTypes::setup(void)
hal.console->printf("Dataflash All Types 1.0\n"); hal.console->printf("Dataflash All Types 1.0\n");
dataflash.Init(log_structure, ARRAY_SIZE(log_structure)); dataflash.Init(log_structure, ARRAY_SIZE(log_structure));
dataflash.set_vehicle_armed(true);
// Test // Test
hal.scheduler->delay(20); hal.scheduler->delay(20);

View File

@ -42,6 +42,7 @@ static DataFlashTest dataflashtest;
void DataFlashTest::setup(void) void DataFlashTest::setup(void)
{ {
dataflash.Init(log_structure, ARRAY_SIZE(log_structure)); dataflash.Init(log_structure, ARRAY_SIZE(log_structure));
dataflash.set_vehicle_armed(true);
hal.console->printf("Dataflash Log Test 1.0\n"); hal.console->printf("Dataflash Log Test 1.0\n");
@ -56,7 +57,7 @@ void DataFlashTest::setup(void)
// We start to write some info (sequentialy) starting from page 1 // We start to write some info (sequentialy) starting from page 1
// This is similar to what we will do... // This is similar to what we will do...
dataflash.StartNewLog(); dataflash.StartUnstartedLogging();
log_num = dataflash.find_last_log(); log_num = dataflash.find_last_log();
hal.console->printf("Using log number %u\n", log_num); hal.console->printf("Using log number %u\n", log_num);
hal.console->printf("After testing perform erase before using DataFlash for logging!\n"); hal.console->printf("After testing perform erase before using DataFlash for logging!\n");