From b5abab9d37f28762d9bd125e9571070256637a40 Mon Sep 17 00:00:00 2001 From: Caio Marcelo de Oliveira Filho Date: Fri, 9 Oct 2015 19:12:08 -0300 Subject: [PATCH] AP_GPS_GSOF: minor tweak to avoid warning Fixes the issue of three unused variables, two of which were used in a commented Debug() call. To keep the convenient debug message (and the variable names for the data bytes), this patch uncomment the debug call but wrap the variables and the debug call around an ifdef for the local symbol gsof_DEBUGGING. So by turning it on, the debug will already be in place. The Debug() call was modified to actually compile and include the third variable in the output. --- libraries/AP_GPS/AP_GPS_GSOF.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/AP_GPS/AP_GPS_GSOF.cpp b/libraries/AP_GPS/AP_GPS_GSOF.cpp index f1f6d3096f..068db3ccfc 100644 --- a/libraries/AP_GPS/AP_GPS_GSOF.cpp +++ b/libraries/AP_GPS/AP_GPS_GSOF.cpp @@ -244,11 +244,14 @@ AP_GPS_GSOF::process_message(void) //http://www.trimble.com/EC_ReceiverHelp/V4.19/en/GSOFmessages_Overview.htm if (gsof_msg.packettype == 0x40) { // GSOF +#if gsof_DEBUGGING uint8_t trans_number = gsof_msg.data[0]; uint8_t pageidx = gsof_msg.data[1]; uint8_t maxpageidx = gsof_msg.data[2]; - //Debug("GSOF page: " + pageidx + " of " + maxpageidx); + Debug("GSOF page: %u of %u (trans_number=%u)", + pageidx, maxpageidx, trans_number); +#endif int valid = 0;