From 334da0d9d5ff6958b5f5b6624041193ea2944ad9 Mon Sep 17 00:00:00 2001 From: murata Date: Sat, 21 Jan 2017 13:59:16 +0900 Subject: [PATCH] Tools: Unify from print or println to printf. --- Tools/CPUInfo/CPUInfo.cpp | 10 +++++----- Tools/Hello/Hello.cpp | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Tools/CPUInfo/CPUInfo.cpp b/Tools/CPUInfo/CPUInfo.cpp index 838da0d39e..7c46579bbd 100644 --- a/Tools/CPUInfo/CPUInfo.cpp +++ b/Tools/CPUInfo/CPUInfo.cpp @@ -15,7 +15,7 @@ void setup() { static void show_sizes(void) { - hal.console->println("Type sizes:"); + hal.console->printf("Type sizes:\n"); hal.console->printf("char : %lu\n", (unsigned long)sizeof(char)); hal.console->printf("short : %lu\n", (unsigned long)sizeof(short)); hal.console->printf("int : %lu\n", (unsigned long)sizeof(int)); @@ -72,8 +72,8 @@ static void show_timings(void) v_out_8 = 1+(AP_HAL::micros() % 3); - hal.console->println("Operation timings:"); - hal.console->println("Note: timings for some operations are very data dependent"); + hal.console->printf("Operation timings:\n"); + hal.console->printf("Note: timings for some operations are very data dependent\n"); TIMEIT("nop", asm volatile("nop"::), 255); @@ -127,9 +127,9 @@ static void show_timings(void) void loop() { show_sizes(); - hal.console->println(""); + hal.console->printf("\n"); show_timings(); - hal.console->println(""); + hal.console->printf("\n"); hal.scheduler->delay(3000); } diff --git a/Tools/Hello/Hello.cpp b/Tools/Hello/Hello.cpp index ab0fcadfda..bc71c9b2ed 100644 --- a/Tools/Hello/Hello.cpp +++ b/Tools/Hello/Hello.cpp @@ -9,13 +9,13 @@ const AP_HAL::HAL& hal = AP_HAL::get_HAL(); void setup() { - hal.console->println("hello world"); + hal.console->printf("hello world\n"); } void loop() { hal.scheduler->delay(1000); - hal.console->println("*"); + hal.console->printf("*\n"); } AP_HAL_MAIN();