mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Forgor to fix expansion in subghz gps
This commit is contained in:
@@ -131,6 +131,9 @@ SubGhzGPS* subghz_gps_init() {
|
||||
furi_thread_set_context(subghz_gps->thread, subghz_gps);
|
||||
furi_thread_set_callback(subghz_gps->thread, subghz_gps_uart_worker);
|
||||
|
||||
subghz_gps->expansion = furi_record_open(RECORD_EXPANSION);
|
||||
expansion_disable(subghz_gps->expansion);
|
||||
|
||||
subghz_gps->serial_handle = furi_hal_serial_control_acquire(UART_CH);
|
||||
furi_check(subghz_gps->serial_handle);
|
||||
furi_hal_serial_init(subghz_gps->serial_handle, 9600);
|
||||
@@ -147,6 +150,9 @@ void subghz_gps_deinit(SubGhzGPS* subghz_gps) {
|
||||
furi_hal_serial_deinit(subghz_gps->serial_handle);
|
||||
furi_hal_serial_control_release(subghz_gps->serial_handle);
|
||||
|
||||
expansion_enable(subghz_gps->expansion);
|
||||
furi_record_close(RECORD_EXPANSION);
|
||||
|
||||
furi_thread_free(subghz_gps->thread);
|
||||
furi_stream_buffer_free(subghz_gps->rx_stream);
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <furi_hal.h>
|
||||
#include <xtreme/xtreme.h>
|
||||
#include <expansion/expansion.h>
|
||||
|
||||
#define UART_CH (xtreme_settings.uart_nmea_channel)
|
||||
|
||||
@@ -13,6 +14,7 @@ typedef enum {
|
||||
#define WORKER_ALL_RX_EVENTS (WorkerEvtStop | WorkerEvtRxDone)
|
||||
|
||||
typedef struct {
|
||||
Expansion* expansion;
|
||||
FuriThread* thread;
|
||||
FuriStreamBuffer* rx_stream;
|
||||
uint8_t rx_buf[RX_BUF_SIZE];
|
||||
|
||||
Reference in New Issue
Block a user