diff --git a/libraries/DataFlash/DataFlash_File.cpp b/libraries/DataFlash/DataFlash_File.cpp index a8360a9192..90a981ed72 100644 --- a/libraries/DataFlash/DataFlash_File.cpp +++ b/libraries/DataFlash/DataFlash_File.cpp @@ -1005,7 +1005,7 @@ void DataFlash_File::ListAvailableLogs(AP_HAL::BetterStream *port) } } #endif - port->println(); + port->printf("\n"); } #if CONFIG_HAL_BOARD == HAL_BOARD_SITL || CONFIG_HAL_BOARD == HAL_BOARD_LINUX diff --git a/libraries/DataFlash/LogFile.cpp b/libraries/DataFlash/LogFile.cpp index 39c196e1f5..428d6d4daa 100644 --- a/libraries/DataFlash/LogFile.cpp +++ b/libraries/DataFlash/LogFile.cpp @@ -119,14 +119,14 @@ uint16_t DataFlash_Block::start_new_log(void) uint16_t last_page = find_last_page(); StartRead(last_page); - //Serial.print("last page: "); Serial.println(last_page); - //Serial.print("file #: "); Serial.println(GetFileNumber()); - //Serial.print("file page: "); Serial.println(GetFilePage()); + //Serial.printf("last page: "); Serial.printf("%u\n", last_page); + //Serial.printf("file #: "); Serial.printf("%u\n", GetFileNumber()); + //Serial.printf("file page: "); Serial.printf("%u\n", GetFilePage()); if(find_last_log() == 0 || GetFileNumber() == 0xFFFF) { SetFileNumber(1); StartWrite(1); - //Serial.println("start log from 0"); + //Serial.printf("start log from 0\n"); log_write_started = true; return 1; } @@ -497,7 +497,7 @@ void DataFlash_Backend::_print_log_entry(uint8_t msg_type, port->printf(", "); } } - port->println(); + port->printf("\n"); } /* @@ -594,7 +594,7 @@ void DataFlash_Block::DumpPageInfo(AP_HAL::BetterStream *port) void DataFlash_Block::ShowDeviceInfo(AP_HAL::BetterStream *port) { if (!CardInserted()) { - port->println("No dataflash inserted"); + port->printf("No dataflash inserted\n"); return; } ReadManufacturerID(); @@ -635,7 +635,7 @@ void DataFlash_Block::ListAvailableLogs(AP_HAL::BetterStream *port) break; } } - port->println(); + port->printf("\n"); } // This function starts a new log file in the DataFlash, and writes diff --git a/libraries/DataFlash/examples/DataFlash_AllTypes/DataFlash_AllTypes.cpp b/libraries/DataFlash/examples/DataFlash_AllTypes/DataFlash_AllTypes.cpp index 60bab9ffd5..a5ad38b333 100644 --- a/libraries/DataFlash/examples/DataFlash_AllTypes/DataFlash_AllTypes.cpp +++ b/libraries/DataFlash/examples/DataFlash_AllTypes/DataFlash_AllTypes.cpp @@ -181,7 +181,7 @@ void DataFlashTest_AllTypes::Log_Write_TypeMessages_Log_Write() void DataFlashTest_AllTypes::setup(void) { - hal.console->println("Dataflash All Types 1.0"); + hal.console->printf("Dataflash All Types 1.0\n"); dataflash.Init(log_structure, ARRAY_SIZE(log_structure)); @@ -190,7 +190,7 @@ void DataFlashTest_AllTypes::setup(void) dataflash.ShowDeviceInfo(hal.console); if (dataflash.NeedPrep()) { - hal.console->println("Preparing dataflash..."); + hal.console->printf("Preparing dataflash...\n"); dataflash.Prep(); } diff --git a/libraries/DataFlash/examples/DataFlash_test/DataFlash_test.cpp b/libraries/DataFlash/examples/DataFlash_test/DataFlash_test.cpp index 72bea5400d..fd0331e8de 100644 --- a/libraries/DataFlash/examples/DataFlash_test/DataFlash_test.cpp +++ b/libraries/DataFlash/examples/DataFlash_test/DataFlash_test.cpp @@ -43,14 +43,14 @@ void DataFlashTest::setup(void) { dataflash.Init(log_structure, ARRAY_SIZE(log_structure)); - hal.console->println("Dataflash Log Test 1.0"); + hal.console->printf("Dataflash Log Test 1.0\n"); // Test hal.scheduler->delay(20); dataflash.ShowDeviceInfo(hal.console); if (dataflash.NeedPrep()) { - hal.console->println("Preparing dataflash..."); + hal.console->printf("Preparing dataflash...\n"); dataflash.Prep(); } @@ -59,9 +59,9 @@ void DataFlashTest::setup(void) dataflash.StartNewLog(); log_num = dataflash.find_last_log(); 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(""); - hal.console->println("Writing to flash... wait..."); + hal.console->printf("After testing perform erase before using DataFlash for logging!\n"); + hal.console->printf("\n"); + hal.console->printf("Writing to flash... wait...\n"); uint32_t total_micros = 0; uint16_t i;