|
@@ -4,6 +4,7 @@
|
|
|
#include <furi.h>
|
|
#include <furi.h>
|
|
|
#include <gui/gui.h>
|
|
#include <gui/gui.h>
|
|
|
#include <string.h>
|
|
#include <string.h>
|
|
|
|
|
+#include <expansion/expansion.h>
|
|
|
|
|
|
|
|
typedef enum {
|
|
typedef enum {
|
|
|
EventTypeTick,
|
|
EventTypeTick,
|
|
@@ -131,6 +132,10 @@ static void input_callback(InputEvent* input_event, FuriMessageQueue* event_queu
|
|
|
int32_t gps_app(void* p) {
|
|
int32_t gps_app(void* p) {
|
|
|
UNUSED(p);
|
|
UNUSED(p);
|
|
|
|
|
|
|
|
|
|
+ // Disable expansion protocol to avoid interference with UART Handle
|
|
|
|
|
+ Expansion* expansion = furi_record_open(RECORD_EXPANSION);
|
|
|
|
|
+ expansion_disable(expansion);
|
|
|
|
|
+
|
|
|
FuriMessageQueue* event_queue = furi_message_queue_alloc(8, sizeof(PluginEvent));
|
|
FuriMessageQueue* event_queue = furi_message_queue_alloc(8, sizeof(PluginEvent));
|
|
|
|
|
|
|
|
GpsUart* gps_uart = gps_uart_enable();
|
|
GpsUart* gps_uart = gps_uart_enable();
|
|
@@ -139,6 +144,9 @@ int32_t gps_app(void* p) {
|
|
|
if(!gps_uart->mutex) {
|
|
if(!gps_uart->mutex) {
|
|
|
FURI_LOG_E("GPS", "cannot create mutex\r\n");
|
|
FURI_LOG_E("GPS", "cannot create mutex\r\n");
|
|
|
free(gps_uart);
|
|
free(gps_uart);
|
|
|
|
|
+ // Return previous state of expansion
|
|
|
|
|
+ expansion_enable(expansion);
|
|
|
|
|
+ furi_record_close(RECORD_EXPANSION);
|
|
|
return 255;
|
|
return 255;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -271,5 +279,9 @@ int32_t gps_app(void* p) {
|
|
|
furi_hal_power_disable_otg();
|
|
furi_hal_power_disable_otg();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // Return previous state of expansion
|
|
|
|
|
+ expansion_enable(expansion);
|
|
|
|
|
+ furi_record_close(RECORD_EXPANSION);
|
|
|
|
|
+
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|