mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
SubGHz: Show Geo info when GPS is disabled
This commit is contained in:
@@ -162,7 +162,7 @@ static float subghz_gps_calc_angle(float lat1, float lon1, float lat2, float lon
|
||||
return atan2(lat1 - lat2, lon1 - lon2) * 180 / (double)M_PI;
|
||||
}
|
||||
|
||||
static void subghz_gps_get_descr(
|
||||
static void subghz_gps_cat_realtime(
|
||||
SubGhzGPS* subghz_gps,
|
||||
FuriString* descr,
|
||||
float latitude,
|
||||
@@ -192,16 +192,11 @@ static void subghz_gps_get_descr(
|
||||
angle_str = "W";
|
||||
}
|
||||
|
||||
furi_string_printf(
|
||||
furi_string_cat_printf(
|
||||
descr,
|
||||
"Captured at: %f,\r\n"
|
||||
"%f\r\n"
|
||||
"\r\n"
|
||||
"Realtime: Sats: %d\r\n"
|
||||
"Distance: %.2f%s Dir: %s\r\n"
|
||||
"GPS time: %02d:%02d:%02d UTC",
|
||||
(double)latitude,
|
||||
(double)longitude,
|
||||
subghz_gps->satellites,
|
||||
(double)(subghz_gps->satellites > 0 ? distance > 1 ? distance : distance * 1000 : 0),
|
||||
distance > 1 ? "km" : "m",
|
||||
@@ -236,7 +231,7 @@ static void subghz_gps_init(SubGhzGPS* subghz_gps, uint32_t baudrate) {
|
||||
subghz_gps->serial_handle, subghz_gps_uart_on_irq_cb, subghz_gps, false);
|
||||
|
||||
subghz_gps->deinit = &subghz_gps_deinit;
|
||||
subghz_gps->get_descr = &subghz_gps_get_descr;
|
||||
subghz_gps->cat_realtime = &subghz_gps_cat_realtime;
|
||||
}
|
||||
|
||||
#include <flipper_application/flipper_application.h>
|
||||
|
||||
Reference in New Issue
Block a user