mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Updated GPS_nmea & NRF24sniffer
This commit is contained in:
12
applications/external/gps_nmea_uart/gps.c
vendored
12
applications/external/gps_nmea_uart/gps.c
vendored
@@ -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;
|
||||
}
|
||||
|
||||
2
applications/external/nrf24sniff/nrfsniff.c
vendored
2
applications/external/nrf24sniff/nrfsniff.c
vendored
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user