mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-25 23:46:04 +08:00
GPS soft reset
This commit is contained in:
@@ -122,6 +122,12 @@
|
||||
</block>
|
||||
</message>
|
||||
|
||||
<message name="RST" ID="0x04" length="4">
|
||||
<field name="nav_bbr" format="U2"/>
|
||||
<field name="Reset" format="U1"/>
|
||||
<field name="Res" format="U1"/>
|
||||
</message>
|
||||
|
||||
<message name="RATE" ID="0x08" length="6">
|
||||
<field name="Meas" format="U2"/>
|
||||
<field name="Nav" format="U2"/>
|
||||
|
||||
@@ -127,6 +127,11 @@ void gps_configure ( void ) {
|
||||
}
|
||||
|
||||
|
||||
void ubxsend_cfg_rst(uint16_t bbr , uint8_t val) {
|
||||
UbxSend_CFG_RST(bbr, val, 0x00);
|
||||
}
|
||||
|
||||
|
||||
struct svinfo gps_svinfos[GPS_NB_CHANNELS];
|
||||
uint8_t gps_nb_channels;
|
||||
|
||||
|
||||
@@ -49,4 +49,18 @@ extern void parse_ubx( uint8_t c );
|
||||
|
||||
#define GpsFixValid() (gps_mode == 3)
|
||||
|
||||
#define CFG_RST_BBR_Hotstart 0x0000
|
||||
#define CFG_RST_BBR_Warmstart 0x0001
|
||||
#define CFG_RST_BBR_Coldstart 0xffff
|
||||
|
||||
#define CFG_RST_Reset_Hardware 0x00
|
||||
#define CFG_RST_Reset_Controlled 0x01
|
||||
#define CFG_RST_Reset_Controlled_GPS_only 0x02
|
||||
#define CFG_RST_Reset_Controlled_GPS_stop 0x08
|
||||
#define CFG_RST_Reset_Controlled_GPS_start 0x09
|
||||
|
||||
void ubxsend_cfg_rst(uint16_t, uint8_t);
|
||||
|
||||
#define gps_ubx_Reset(_val) { if (_val > CFG_RST_BBR_Warmstart) _val = CFG_RST_BBR_Coldstart; ubxsend_cfg_rst(_val, CFG_RST_Reset_Controlled); }
|
||||
|
||||
#endif /* UBX_H */
|
||||
|
||||
@@ -60,3 +60,8 @@ value sim_use_gps_pos_bytecode(value *a, int argn) {
|
||||
assert(argn == 11);
|
||||
return sim_use_gps_pos(a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7], a[8],a[9], a[10]);
|
||||
}
|
||||
|
||||
void ubxsend_cfg_rst(uint16_t a, uint8_t b) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user