Updated GPS_nmea & NRF24sniffer

This commit is contained in:
Sil333033
2023-10-05 23:19:11 +02:00
parent 5b91931b76
commit c489d3b63b
2 changed files with 13 additions and 1 deletions

View File

@@ -93,6 +93,14 @@ int32_t gps_app(void* p) {
return 255;
}
uint8_t attempts = 0;
bool otg_was_enabled = furi_hal_power_is_otg_enabled();
while(!furi_hal_power_is_otg_enabled() && attempts++ < 5) {
furi_hal_power_enable_otg();
furi_delay_ms(10);
}
furi_delay_ms(200);
// set system callbacks
ViewPort* view_port = view_port_alloc();
view_port_draw_callback_set(view_port, render_callback, gps_uart);
@@ -186,5 +194,9 @@ int32_t gps_app(void* p) {
furi_mutex_free(gps_uart->mutex);
gps_uart_disable(gps_uart);
if(furi_hal_power_is_otg_enabled() && !otg_was_enabled) {
furi_hal_power_disable_otg();
}
return 0;
}

View File

@@ -10,7 +10,7 @@
#define LOGITECH_MAX_CHANNEL 85
#define COUNT_THRESHOLD 2
#define DEFAULT_SAMPLE_TIME 8000
#define DEFAULT_SAMPLE_TIME 4000
#define MAX_ADDRS 100
#define MAX_CONFIRMED 32