mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-20 12:54:33 -04:00
Fix ADS-B not updating Altitude in Map #473
This commit will fix altitude not automatically updating when in Map mode. Also set default altitude for AIS to 0.
This commit is contained in:
parent
f42479c190
commit
7af7279ea4
5 changed files with 7 additions and 5 deletions
|
@ -253,14 +253,16 @@ void GeoMapView::focus() {
|
|||
nav_.display_modal("No map", "No world_map.bin file in\n/ADSB/ directory", ABORT, nullptr);
|
||||
}
|
||||
|
||||
void GeoMapView::update_position(float lat, float lon, uint16_t angle) {
|
||||
void GeoMapView::update_position(float lat, float lon, uint16_t angle, int32_t altitude) {
|
||||
lat_ = lat;
|
||||
lon_ = lon;
|
||||
altitude_ = altitude;
|
||||
|
||||
// Stupid hack to avoid an event loop
|
||||
geopos.set_report_change(false);
|
||||
geopos.set_lat(lat_);
|
||||
geopos.set_lon(lon_);
|
||||
geopos.set_altitude(altitude_);
|
||||
geopos.set_report_change(true);
|
||||
|
||||
geomap.set_angle(angle);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue