From b526880814917c449b2125eb16b3ea10d34de0e9 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sat, 30 Jun 2018 22:15:06 -0500 Subject: [PATCH] consistently use F-strings for serial prints --- RFout1MHzV1_05/RFout1MHzV1_05.ino | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/RFout1MHzV1_05/RFout1MHzV1_05.ino b/RFout1MHzV1_05/RFout1MHzV1_05.ino index 2e302b5..33e99a7 100644 --- a/RFout1MHzV1_05/RFout1MHzV1_05.ino +++ b/RFout1MHzV1_05/RFout1MHzV1_05.ino @@ -15,7 +15,7 @@ SoftwareSerial gpsPort(2, 3); // RX, TX #define FIXOut 4 //Pin Out at IDC. Indicator for GPS Lock on pin 4 #define LDO_Enable A3 //GPS Voltage regulator Enable on pin A3 boolean GPSOK; -const char softwareversion[] = "1.05" ; //Version of this program, sent to serialport at startup +#define softwareversion "1.05" //Version of this program, sent to serialport at startup NMEAGPS gps; // This parses the GPS characters gps_fix fix; // This holds on to the latest values @@ -35,9 +35,8 @@ void setup() { Serial.begin(9600); while (!Serial); - Serial.println(""); - Serial.print(F("Zachtek GPS referenced RF, Software version: ")); - Serial.println(softwareversion); + Serial.println(F("")); + Serial.print(F("Zachtek GPS referenced RF, Software version: " softwareversion)); pinMode(LDO_Enable, OUTPUT); // Set Voltage Regulator Enable pin as output. @@ -67,14 +66,12 @@ void setup() //Program GPS to output RF if (setGPS_OutputFreq(SPEED_ARG)) { - Serial.println ("GPS Initialized to output RF at " SPEED_STR); - Serial.println ("Initialization is complete."); - Serial.println (""); + Serial.println (F("GPS Initialized to output RF at " SPEED_STR "\nInitialization is complete.\n")); GPSOK = true; } else { - Serial.println ("Error! Could not program GPS!"); + Serial.println (F("Error! Could not program GPS!")); GPSOK = false; } } @@ -149,7 +146,7 @@ bool setGPS_OutputFreq(uint32_t freq) { ubx_compute_checksum(setOutputFreq+2, setOutputFreq+38, setOutputFreq+38); sendUBX(setOutputFreq, sizeof(setOutputFreq) / sizeof(uint8_t)); bool gps_set_sucess = getUBX_ACK(setOutputFreq); - Serial.println("Set output Freq Done"); + // Serial.println(F("Set output Freq Done")); return gps_set_sucess; }