Browse Source

AP_GPS: Add agcCnt to UBX1 message

mission-4.1.18
Jonathan Challinger 10 years ago committed by Andrew Tridgell
parent
commit
6848897999
  1. 8
      libraries/AP_GPS/AP_GPS_UBLOX.cpp
  2. 3
      libraries/DataFlash/DataFlash.h

8
libraries/AP_GPS/AP_GPS_UBLOX.cpp

@ -258,14 +258,16 @@ void AP_GPS_UBLOX::log_mon_hw(void) @@ -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) @@ -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

3
libraries/DataFlash/DataFlash.h

@ -407,6 +407,7 @@ struct PACKED log_Ubx1 { @@ -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 { @@ -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" }

Loading…
Cancel
Save