mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-21 08:14:00 +08:00
enable wshadow (#22756)
* enable wshadow (#22714) * fix replay * more build fixes Co-authored-by: Willem Melching <willem.melching@gmail.com> old-commit-hash: 5246f0231e6bfa572c0dd89c60e538910817faa2
This commit is contained in:
@@ -344,12 +344,12 @@ void Localizer::handle_cam_odo(double current_time, const cereal::CameraOdometry
|
||||
|
||||
void Localizer::handle_live_calib(double current_time, const cereal::LiveCalibrationData::Reader& log) {
|
||||
if (log.getRpyCalib().size() > 0) {
|
||||
auto calib = floatlist2vector(log.getRpyCalib());
|
||||
if ((calib.minCoeff() < -CALIB_RPY_SANITY_CHECK) || (calib.maxCoeff() > CALIB_RPY_SANITY_CHECK)) {
|
||||
auto live_calib = floatlist2vector(log.getRpyCalib());
|
||||
if ((live_calib.minCoeff() < -CALIB_RPY_SANITY_CHECK) || (live_calib.maxCoeff() > CALIB_RPY_SANITY_CHECK)) {
|
||||
return;
|
||||
}
|
||||
|
||||
this->calib = calib;
|
||||
this->calib = live_calib;
|
||||
this->device_from_calib = euler2rot(this->calib);
|
||||
this->calib_from_device = this->device_from_calib.transpose();
|
||||
this->calibrated = log.getCalStatus() == 1;
|
||||
|
||||
@@ -172,12 +172,14 @@ kj::Array<capnp::word> UbloxMsgParser::gen_rxm_sfrbx(ubx_t::rxm_sfrbx_t *msg) {
|
||||
}
|
||||
|
||||
// Collect subframes in map and parse when we have all the parts
|
||||
kaitai::kstream stream(subframe_data);
|
||||
gps_t subframe(&stream);
|
||||
int subframe_id = subframe.how()->subframe_id();
|
||||
{
|
||||
kaitai::kstream stream(subframe_data);
|
||||
gps_t subframe(&stream);
|
||||
int subframe_id = subframe.how()->subframe_id();
|
||||
|
||||
if (subframe_id == 1) gps_subframes[msg->sv_id()].clear();
|
||||
gps_subframes[msg->sv_id()][subframe_id] = subframe_data;
|
||||
if (subframe_id == 1) gps_subframes[msg->sv_id()].clear();
|
||||
gps_subframes[msg->sv_id()][subframe_id] = subframe_data;
|
||||
}
|
||||
|
||||
if (gps_subframes[msg->sv_id()].size() == 5) {
|
||||
MessageBuilder msg_builder;
|
||||
|
||||
@@ -45,10 +45,10 @@ int main() {
|
||||
if(parser.add_data(data + bytes_consumed, (uint32_t)(len - bytes_consumed), bytes_consumed_this_time)) {
|
||||
|
||||
try {
|
||||
auto msg = parser.gen_msg();
|
||||
if (msg.second.size() > 0) {
|
||||
auto bytes = msg.second.asBytes();
|
||||
pm.send(msg.first.c_str(), bytes.begin(), bytes.size());
|
||||
auto ublox_msg = parser.gen_msg();
|
||||
if (ublox_msg.second.size() > 0) {
|
||||
auto bytes = ublox_msg.second.asBytes();
|
||||
pm.send(ublox_msg.first.c_str(), bytes.begin(), bytes.size());
|
||||
}
|
||||
} catch (const std::exception& e) {
|
||||
LOGE("Error parsing ublox message %s", e.what());
|
||||
|
||||
Reference in New Issue
Block a user