mirror of
https://github.com/armel/uv-k1-k5v3-firmware-custom.git
synced 2026-10-02 03:15:37 +00:00
Fix: handle restart in modal apps
This commit is contained in:
1 parent
fe602b075d
commit
a8912d3208
5 files changed
+36
-2
No files matched your search
@@ -16,6 +16,10 @@
|
|||||||
|
|
||||||
#include "app/breakout.h"
|
#include "app/breakout.h"
|
||||||
|
|
||||||
|
#if defined(ENABLE_UART) || defined(ENABLE_USB)
|
||||||
|
#include "app/uart.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_FEAT_F4HWN_K5VIEWER
|
#ifdef ENABLE_FEAT_F4HWN_K5VIEWER
|
||||||
#include "k5viewer.h"
|
#include "k5viewer.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -359,6 +363,9 @@ void APP_RunBreakout(void) {
|
|||||||
|
|
||||||
while(isInitialized)
|
while(isInitialized)
|
||||||
{
|
{
|
||||||
|
#if defined(ENABLE_UART) || defined(ENABLE_USB)
|
||||||
|
UART_ServiceCommands();
|
||||||
|
#endif
|
||||||
Tick();
|
Tick();
|
||||||
if(!isPaused)
|
if(!isPaused)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,6 +18,10 @@
|
|||||||
|
|
||||||
#ifdef ENABLE_FEAT_F4HWN_FOXHUNT
|
#ifdef ENABLE_FEAT_F4HWN_FOXHUNT
|
||||||
|
|
||||||
|
#if defined(ENABLE_UART) || defined(ENABLE_USB)
|
||||||
|
#include "app/uart.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_FEAT_F4HWN_K5VIEWER
|
#ifdef ENABLE_FEAT_F4HWN_K5VIEWER
|
||||||
#include "k5viewer.h"
|
#include "k5viewer.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -965,6 +969,9 @@ void APP_RunFoxHunt(void)
|
|||||||
|
|
||||||
foxRunning = true;
|
foxRunning = true;
|
||||||
while (foxRunning) {
|
while (foxRunning) {
|
||||||
|
#if defined(ENABLE_UART) || defined(ENABLE_USB)
|
||||||
|
UART_ServiceCommands();
|
||||||
|
#endif
|
||||||
if (foxBeacon) {
|
if (foxBeacon) {
|
||||||
FOXHUNT_BeaconTick();
|
FOXHUNT_BeaconTick();
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -18,6 +18,10 @@
|
|||||||
#include "audio.h"
|
#include "audio.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
||||||
|
#if defined(ENABLE_UART) || defined(ENABLE_USB)
|
||||||
|
#include "app/uart.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_SCAN_RANGES
|
#ifdef ENABLE_SCAN_RANGES
|
||||||
#include "chFrScanner.h"
|
#include "chFrScanner.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -2608,6 +2612,9 @@ void APP_RunSpectrum()
|
|||||||
|
|
||||||
while (isInitialized)
|
while (isInitialized)
|
||||||
{
|
{
|
||||||
|
#if defined(ENABLE_UART) || defined(ENABLE_USB)
|
||||||
|
UART_ServiceCommands();
|
||||||
|
#endif
|
||||||
Tick();
|
Tick();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+14
-1
@@ -866,4 +866,17 @@ void UART_HandleCommand(uint32_t Port)
|
|||||||
#ifdef ENABLE_FEAT_F4HWN_K5VIEWER
|
#ifdef ENABLE_FEAT_F4HWN_K5VIEWER
|
||||||
gUART_LockK5Viewer = 20; // lock the K5Viewer stream
|
gUART_LockK5Viewer = 20; // lock the K5Viewer stream
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void UART_ServiceCommands(void)
|
||||||
|
{
|
||||||
|
#ifdef ENABLE_USB
|
||||||
|
if (UART_IsCommandAvailable(UART_PORT_VCP))
|
||||||
|
UART_HandleCommand(UART_PORT_VCP);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_UART
|
||||||
|
if (UART_IsCommandAvailable(UART_PORT_UART))
|
||||||
|
UART_HandleCommand(UART_PORT_UART);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
+1
-1
@@ -32,6 +32,6 @@ enum
|
|||||||
|
|
||||||
bool UART_IsCommandAvailable(uint32_t Port);
|
bool UART_IsCommandAvailable(uint32_t Port);
|
||||||
void UART_HandleCommand(uint32_t Port);
|
void UART_HandleCommand(uint32_t Port);
|
||||||
|
void UART_ServiceCommands(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Reference in new issue
Block a user