ubx: add sbas config, default to disable

This commit is contained in:
Thomas Gubler
2014-09-22 19:04:24 +02:00
parent 6a6bd09973
commit 69eb222d4e
2 changed files with 29 additions and 0 deletions
+12
View File
@@ -189,6 +189,16 @@ UBX::configure(unsigned &baudrate)
return 1;
}
/* send a SBAS message to set the SBAS options */
memset(&_buf.payload_tx_cfg_sbas, 0, sizeof(_buf.payload_tx_cfg_sbas));
_buf.payload_tx_cfg_sbas.mode = UBX_TX_CFG_SBAS_MODE;
send_message(UBX_MSG_CFG_SBAS, _buf.raw, sizeof(_buf.payload_tx_cfg_sbas));
if (wait_for_ack(UBX_MSG_CFG_SBAS, UBX_CONFIG_TIMEOUT, true) < 0) {
return 1;
}
/* configure message rates */
/* the last argument is divisor for measurement rate (set by CFG RATE), i.e. 1 means 5Hz */
@@ -265,6 +275,8 @@ UBX::wait_for_ack(const uint16_t msg, const unsigned timeout, const bool report)
}
}
warnx("msg %u ret %d", msg, ret);
_ack_state = UBX_ACK_IDLE;
return ret;
}