From a3f1aa0c7b9eb3efba6f643d79445bc7be8fe4a9 Mon Sep 17 00:00:00 2001 From: rmackay9 Date: Mon, 22 Oct 2012 16:40:57 +0900 Subject: [PATCH] AP_Curve: replace Serial.print with Serial.print_P to save 18 bytes of memory --- libraries/AP_Common/AP_Curve.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/AP_Common/AP_Curve.h b/libraries/AP_Common/AP_Curve.h index 52c0aa10c9..ae5c8b8e9a 100644 --- a/libraries/AP_Common/AP_Curve.h +++ b/libraries/AP_Common/AP_Curve.h @@ -129,13 +129,13 @@ T AP_Curve::get_y( T x ) template void AP_Curve::dump_curve() { - Serial.println("Curve:"); + Serial.println_P(PSTR("Curve:")); for( uint8_t i = 0; i<_num_points; i++ ){ - Serial.print("x:"); + Serial.print_P(PSTR("x:")); Serial.print(_x[i]); - Serial.print("\ty:"); + Serial.print_P(PSTR("\ty:")); Serial.print(_y[i]); - Serial.print("\tslope:"); + Serial.print_P(PSTR("\tslope:")); Serial.print(_slope[i],4); Serial.println(); }