diff --git a/mazda/callbacks.cpp b/mazda/callbacks.cpp index 0e79cef3..50c09fe2 100644 --- a/mazda/callbacks.cpp +++ b/mazda/callbacks.cpp @@ -763,11 +763,19 @@ void MazdaEventCallbacks::HandleNaviTurnDistance(IHUConnectionThreadInterface& s navi_data->distance_unit = now_unit; navi_data->distance = now_distance; navi_data->changed = 1; + navi_data->previous_msg = navi_data->previous_msg+1; + if (navi_data->previous_msg == 8) { + navi_data->previous_msg = 1; + } } if (navi_data->time_until != request.time_until()) { navi_data->time_until = request.time_until(); navi_data->changed = 1; + navi_data->previous_msg = navi_data->previous_msg+1; + if (navi_data->previous_msg == 8) { + navi_data->previous_msg = 1; + } } hudmutex.unlock(); @@ -818,4 +826,4 @@ void logUnknownFields(const ::google::protobuf::UnknownFieldSet& fields) { break; } } -} \ No newline at end of file +} diff --git a/mazda/hud/hud.cpp b/mazda/hud/hud.cpp index af50f746..a3f7e49f 100644 --- a/mazda/hud/hud.cpp +++ b/mazda/hud/hud.cpp @@ -35,7 +35,7 @@ uint8_t turns[][3] = { {NaviTurns::SHARP_LEFT,NaviTurns::SHARP_RIGHT,0}, //TURN_SHARP_TURN {NaviTurns::U_TURN_LEFT, NaviTurns::U_TURN_RIGHT,0}, //TURN_U_TURN {NaviTurns::LEFT,NaviTurns::RIGHT,NaviTurns::STRAIGHT}, //TURN_ON_RAMP - {NaviTurns::LEFT,NaviTurns::RIGHT,NaviTurns::STRAIGHT}, //TURN_OFF_RAMP + {NaviTurns::OFF_RAMP_LEFT,NaviTurns::OFF_RAMP_RIGHT,NaviTurns::STRAIGHT}, //TURN_OFF_RAMP {NaviTurns::FORK_LEFT, NaviTurns::FORK_RIGHT, 0}, //TURN_FORK {NaviTurns::MERGE_LEFT, NaviTurns::MERGE_RIGHT, 0}, //TURN_MERGE {0,0,0}, //TURN_ROUNDABOUT_ENTER @@ -161,4 +161,4 @@ bool hud_installed() loge("DBUS: GetHUDIsInstalled failed %s: %s\n", error.name(), error.message()); return(false); } -} \ No newline at end of file +} diff --git a/mazda/hud/hud.h b/mazda/hud/hud.h index 2222340c..b1a058a8 100644 --- a/mazda/hud/hud.h +++ b/mazda/hud/hud.h @@ -50,7 +50,9 @@ enum NaviTurns: uint32_t { FORK_LEFT = 15, FORK_RIGHT = 14, MERGE_LEFT = 16, - MERGE_RIGHT = 17 + MERGE_RIGHT = 17, + OFF_RAMP_LEFT = 7, + OFF_RAMP_RIGHT = 30 }; void hud_start();