mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-06 21:54:27 -04:00
Fixed the mixing of aircraft coordinates in the details view, by
checking if the ICAO address of the frame and the current item in the details view match. Slight refactor by placing the decimal to string conversion function into the string_format module. Added fix in the scope of issue #365 FrequencyStepView field in TransmitterView class FrequencyStepView field in TransmitterView class Update ui_transmitter.hpp Update credits Fixed left padding of the decimal part of the numbers.
This commit is contained in:
parent
97349b06ef
commit
fe806b7bdc
12 changed files with 77 additions and 55 deletions
|
@ -63,17 +63,9 @@ GeoPos::GeoPos(
|
|||
const auto changed_fn = [this](int32_t) {
|
||||
float lat_value = lat();
|
||||
float lon_value = lon();
|
||||
double integer_part;
|
||||
double fractional_part;
|
||||
|
||||
fractional_part = modf(lat_value, &integer_part) * 100000;
|
||||
if (fractional_part < 0)
|
||||
fractional_part = -fractional_part;
|
||||
text_lat_decimal.set(to_string_dec_int(integer_part) + "." + to_string_dec_uint(fractional_part, 5));
|
||||
fractional_part = modf(lon_value, &integer_part) * 100000;
|
||||
if (fractional_part < 0)
|
||||
fractional_part = -fractional_part;
|
||||
text_lon_decimal.set(to_string_dec_int(integer_part) + "." + to_string_dec_uint(fractional_part, 5));
|
||||
|
||||
text_lat_decimal.set(to_string_decimal(lat_value, 5));
|
||||
text_lon_decimal.set(to_string_decimal(lon_value, 5));
|
||||
|
||||
if (on_change && report_change)
|
||||
on_change(altitude(), lat_value, lon_value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue