From 68488979999bae68edbedec584d1a6149481156d Mon Sep 17 00:00:00 2001 From: Jonathan Challinger Date: Tue, 28 Oct 2014 12:50:51 -0700 Subject: [PATCH] AP_GPS: Add agcCnt to UBX1 message --- libraries/AP_GPS/AP_GPS_UBLOX.cpp | 8 +++++--- libraries/DataFlash/DataFlash.h | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libraries/AP_GPS/AP_GPS_UBLOX.cpp b/libraries/AP_GPS/AP_GPS_UBLOX.cpp index 201720c8a4..5e14534c22 100644 --- a/libraries/AP_GPS/AP_GPS_UBLOX.cpp +++ b/libraries/AP_GPS/AP_GPS_UBLOX.cpp @@ -258,14 +258,16 @@ void AP_GPS_UBLOX::log_mon_hw(void) instance : state.instance, noisePerMS : _buffer.mon_hw_60.noisePerMS, jamInd : _buffer.mon_hw_60.jamInd, - aPower : _buffer.mon_hw_60.aPower + aPower : _buffer.mon_hw_60.aPower, + agcCnt : _buffer.mon_hw_60.agcCnt, }; if (_payload_length == 68) { pkt.noisePerMS = _buffer.mon_hw_68.noisePerMS; pkt.jamInd = _buffer.mon_hw_68.jamInd; pkt.aPower = _buffer.mon_hw_68.aPower; + pkt.agcCnt = _buffer.mon_hw_68.agcCnt; } - gps._DataFlash->WriteBlock(&pkt, sizeof(pkt)); + gps._DataFlash->WriteBlock(&pkt, sizeof(pkt)); } void AP_GPS_UBLOX::log_mon_hw2(void) @@ -283,7 +285,7 @@ void AP_GPS_UBLOX::log_mon_hw2(void) ofsQ : _buffer.mon_hw2.ofsQ, magQ : _buffer.mon_hw2.magQ, }; - gps._DataFlash->WriteBlock(&pkt, sizeof(pkt)); + gps._DataFlash->WriteBlock(&pkt, sizeof(pkt)); } #endif // UBLOX_HW_LOGGING diff --git a/libraries/DataFlash/DataFlash.h b/libraries/DataFlash/DataFlash.h index 22f9a51fcc..1687c9abf4 100644 --- a/libraries/DataFlash/DataFlash.h +++ b/libraries/DataFlash/DataFlash.h @@ -407,6 +407,7 @@ struct PACKED log_Ubx1 { uint16_t noisePerMS; uint8_t jamInd; uint8_t aPower; + uint16_t agcCnt; }; struct PACKED log_Ubx2 { @@ -469,7 +470,7 @@ struct PACKED log_Ubx2 { { LOG_TERRAIN_MSG, sizeof(log_TERRAIN), \ "TERR","IBLLHffHH","TimeMS,Status,Lat,Lng,Spacing,TerrH,CHeight,Pending,Loaded" }, \ { LOG_UBX1_MSG, sizeof(log_Ubx1), \ - "UBX1", "IBHBB", "TimeMS,Instance,noisePerMS,jamInd,aPower" }, \ + "UBX1", "IBHBBH", "TimeMS,Instance,noisePerMS,jamInd,aPower,agcCnt" }, \ { LOG_UBX2_MSG, sizeof(log_Ubx2), \ "UBX2", "IBbBbB", "TimeMS,Instance,ofsI,magI,ofsQ,magQ" }