mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-19 01:03:22 +00:00
28eb4d1060
Not full refactoring, only small issues is fixed and moved all plugins to furi mutex instead of valuemutex Many small issues was found and fixed due mutex upgrade OFW removed 60 lines of code and it was painful
37 lines
690 B
C
37 lines
690 B
C
#pragma once
|
|
|
|
#include <furi_hal.h>
|
|
#include <notification/notification_messages.h>
|
|
|
|
#define GPS_BAUDRATE 9600
|
|
#define RX_BUF_SIZE 1024
|
|
|
|
typedef struct {
|
|
bool valid;
|
|
float latitude;
|
|
float longitude;
|
|
float speed;
|
|
float course;
|
|
float altitude;
|
|
char altitude_units;
|
|
int fix_quality;
|
|
int satellites_tracked;
|
|
int time_hours;
|
|
int time_minutes;
|
|
int time_seconds;
|
|
} GpsStatus;
|
|
|
|
typedef struct {
|
|
FuriMutex* mutex;
|
|
FuriThread* thread;
|
|
FuriStreamBuffer* rx_stream;
|
|
uint8_t rx_buf[RX_BUF_SIZE];
|
|
|
|
NotificationApp* notifications;
|
|
|
|
GpsStatus status;
|
|
} GpsUart;
|
|
|
|
GpsUart* gps_uart_enable();
|
|
|
|
void gps_uart_disable(GpsUart* gps_uart);
|