diff --git a/APMrover2/APMrover2.pde b/APMrover2/APMrover2.pde index 634ec1bf55..adb72b8562 100644 --- a/APMrover2/APMrover2.pde +++ b/APMrover2/APMrover2.pde @@ -536,7 +536,7 @@ static int32_t perf_mon_timer; // The maximum main loop execution time recorded in the current performance monitoring interval static int16_t G_Dt_max = 0; // The number of gps fixes recorded in the current performance monitoring interval -static int16_t gps_fix_count = 0; +static uint8_t gps_fix_count = 0; // A variable used by developers to track performanc metrics. // Currently used to record the number of GCS heartbeat messages received static int16_t pmTest1 = 0; diff --git a/APMrover2/Log.pde b/APMrover2/Log.pde index 06169f70ff..e43d63ee91 100644 --- a/APMrover2/Log.pde +++ b/APMrover2/Log.pde @@ -600,8 +600,8 @@ static void Log_Write_Current() struct log_Current pkt = { LOG_PACKET_HEADER_INIT(LOG_CURRENT_MSG), throttle_in : g.channel_throttle.control_in, - battery_voltage : (int16_t)battery_voltage1 * 100.0, - current_amps : (int16_t)current_amps1 * 100.0, + battery_voltage : (int16_t)(battery_voltage1 * 100.0), + current_amps : (int16_t)(current_amps1 * 100.0), current_total : (int16_t)current_total1 }; DataFlash.WriteBlock(&pkt, sizeof(pkt));