From edda76623feb35ac0500f2a34f5e4d912d7b9e82 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 17 Dec 2013 11:32:50 +1100 Subject: [PATCH] Copter: updates for DataFlash API changes --- ArduCopter/Log.pde | 4 +--- ArduCopter/system.pde | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ArduCopter/Log.pde b/ArduCopter/Log.pde index 0d93d596ed..09507b1547 100644 --- a/ArduCopter/Log.pde +++ b/ArduCopter/Log.pde @@ -792,8 +792,6 @@ static void Log_Read(uint16_t log_num, uint16_t start_page, uint16_t end_page) cliSerial->println_P(PSTR(HAL_BOARD_NAME)); DataFlash.LogReadProcess(log_num, start_page, end_page, - sizeof(log_structure)/sizeof(log_structure[0]), - log_structure, print_flight_mode, cliSerial); } @@ -803,7 +801,7 @@ static void start_logging() { if (g.log_bitmask != 0 && !ap.logging_started) { ap.logging_started = true; - DataFlash.StartNewLog(sizeof(log_structure)/sizeof(log_structure[0]), log_structure); + DataFlash.StartNewLog(); DataFlash.Log_Write_Message_P(PSTR(FIRMWARE_STRING)); // write system identifier as well if available diff --git a/ArduCopter/system.pde b/ArduCopter/system.pde index 0b5bd88345..ee83abe7ae 100644 --- a/ArduCopter/system.pde +++ b/ArduCopter/system.pde @@ -161,7 +161,7 @@ static void init_ardupilot() mavlink_system.type = 2; //MAV_QUADROTOR; #if LOGGING_ENABLED == ENABLED - DataFlash.Init(); + DataFlash.Init(log_structure, sizeof(log_structure)/sizeof(log_structure[0])); if (!DataFlash.CardInserted()) { gcs_send_text_P(SEVERITY_LOW, PSTR("No dataflash inserted")); g.log_bitmask.set(0);