mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AP_DAL: add interface for first usable compass
This commit is contained in:
parent
1d29619e51
commit
a52f04ddde
@ -22,6 +22,7 @@ void AP_DAL_Compass::start_frame()
|
|||||||
_RMGH.declination = compass.get_declination();
|
_RMGH.declination = compass.get_declination();
|
||||||
_RMGH.num_enabled = compass.get_num_enabled();
|
_RMGH.num_enabled = compass.get_num_enabled();
|
||||||
_RMGH.consistent = compass.consistent();
|
_RMGH.consistent = compass.consistent();
|
||||||
|
_RMGH.first_usable = compass.get_first_usable();
|
||||||
|
|
||||||
WRITE_REPLAY_BLOCK_IFCHANGED(RMGH, _RMGH, old);
|
WRITE_REPLAY_BLOCK_IFCHANGED(RMGH, _RMGH, old);
|
||||||
|
|
||||||
|
@ -53,6 +53,9 @@ public:
|
|||||||
// check if the compasses are pointing in the same direction
|
// check if the compasses are pointing in the same direction
|
||||||
bool consistent() const { return _RMGH.consistent; }
|
bool consistent() const { return _RMGH.consistent; }
|
||||||
|
|
||||||
|
// returns first usable compass
|
||||||
|
uint8_t get_first_usable() const { return _RMGH.first_usable; }
|
||||||
|
|
||||||
// AP_DAL methods:
|
// AP_DAL methods:
|
||||||
AP_DAL_Compass();
|
AP_DAL_Compass();
|
||||||
|
|
||||||
|
@ -244,6 +244,7 @@ struct log_RMGH {
|
|||||||
uint8_t num_enabled;
|
uint8_t num_enabled;
|
||||||
bool learn_offsets_enabled;
|
bool learn_offsets_enabled;
|
||||||
bool consistent;
|
bool consistent;
|
||||||
|
uint8_t first_usable;
|
||||||
uint8_t _end;
|
uint8_t _end;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -400,7 +401,7 @@ struct log_RBOH {
|
|||||||
{ LOG_RGPJ_MSG, RLOG_SIZE(RGPJ), \
|
{ LOG_RGPJ_MSG, RLOG_SIZE(RGPJ), \
|
||||||
"RGPJ", "IffffffiiiffHB", "TS,VX,VY,VZ,SA,Y,YA,Lat,Lon,Alt,HA,VA,HD,I", "-------------#", "--------------" }, \
|
"RGPJ", "IffffffiiiffHB", "TS,VX,VY,VZ,SA,Y,YA,Lat,Lon,Alt,HA,VA,HD,I", "-------------#", "--------------" }, \
|
||||||
{ LOG_RMGH_MSG, RLOG_SIZE(RMGH), \
|
{ LOG_RMGH_MSG, RLOG_SIZE(RMGH), \
|
||||||
"RMGH", "BBfBBB", "Dec,NumInst,AutoDec,NumEna,LOE,C", "------", "------" }, \
|
"RMGH", "BBfBBBB", "Dec,NumInst,AutoDec,NumEna,LOE,C,FUsable", "-------", "-------" }, \
|
||||||
{ LOG_RMGI_MSG, RLOG_SIZE(RMGI), \
|
{ LOG_RMGI_MSG, RLOG_SIZE(RMGI), \
|
||||||
"RMGI", "IffffffBBBB", "LU,OX,OY,OZ,FX,FY,FZ,UFY,H,HSF,I", "----------#", "-----------" }, \
|
"RMGI", "IffffffBBBB", "LU,OX,OY,OZ,FX,FY,FZ,UFY,H,HSF,I", "----------#", "-----------" }, \
|
||||||
{ LOG_RBCH_MSG, RLOG_SIZE(RBCH), \
|
{ LOG_RBCH_MSG, RLOG_SIZE(RBCH), \
|
||||||
|
Loading…
Reference in New Issue
Block a user