0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-18 22:29:50 +03:00

Tidy ups and makefile update

This commit is contained in:
OneOfEleven
2023-09-14 09:56:30 +01:00
parent fe212140dd
commit 54711a5971
53 changed files with 1092 additions and 687 deletions

View File

@ -30,8 +30,8 @@ uint8_t gBatteryDisplayLevel;
bool gChargingWithTypeC;
bool gLowBattery;
bool gLowBatteryBlink;
volatile uint16_t gBatterySave;
uint16_t gBatteryCheckCounter;
volatile uint16_t gBatterySave;
void BATTERY_GetReadings(bool bDisplayBatteryLevel)
{

View File

@ -20,22 +20,18 @@
#include <stdbool.h>
#include <stdint.h>
extern uint16_t gBatteryCalibration[6];
extern uint16_t gBatteryCurrentVoltage;
extern uint16_t gBatteryCurrent;
extern uint16_t gBatteryVoltages[4];
extern uint16_t gBatteryVoltageAverage;
extern uint8_t gBatteryDisplayLevel;
extern bool gChargingWithTypeC;
extern bool gLowBattery;
extern bool gLowBatteryBlink;
extern uint16_t gBatteryCalibration[6];
extern uint16_t gBatteryCurrentVoltage;
extern uint16_t gBatteryCurrent;
extern uint16_t gBatteryVoltages[4];
extern uint16_t gBatteryVoltageAverage;
extern uint8_t gBatteryDisplayLevel;
extern bool gChargingWithTypeC;
extern bool gLowBattery;
extern bool gLowBatteryBlink;
extern uint16_t gBatteryCheckCounter;
extern volatile uint16_t gBatterySave;
extern uint16_t gBatteryCheckCounter;
void BATTERY_GetReadings(bool bDisplayBatteryLevel);
#endif

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
#ifndef DISABLE_AIRCOPY
#ifdef ENABLE_AIRCOPY
#include "app/aircopy.h"
#endif
#include "bsp/dp32g030/gpio.h"
@ -53,7 +53,7 @@ BOOT_Mode_t BOOT_GetMode(void)
if (Keys[0] == KEY_SIDE1)
return BOOT_MODE_F_LOCK;
#ifndef DISABLE_AIRCOPY
#ifdef ENABLE_AIRCOPY
if (Keys[0] == KEY_SIDE2)
return BOOT_MODE_AIRCOPY;
#endif
@ -71,17 +71,17 @@ void BOOT_ProcessMode(BOOT_Mode_t Mode)
GUI_SelectNextDisplay(DISPLAY_MENU);
gF_LOCK = true;
gMenuListCount = 57;
#ifdef DISABLE_VOICE
#ifndef ENABLE_VOICE
gMenuListCount--;
#endif
#ifdef DISABLE_ALARM
#ifndef ENABLE_ALARM
gMenuListCount--;
#endif
#ifdef DISABLE_NOAA
#ifndef ENABLE_NOAA
gMenuListCount--;
#endif
}
#ifndef DISABLE_AIRCOPY
#ifdef ENABLE_AIRCOPY
else
if (Mode == BOOT_MODE_AIRCOPY)
{

View File

@ -24,7 +24,7 @@ enum BOOT_Mode_t
{
BOOT_MODE_NORMAL = 0,
BOOT_MODE_F_LOCK,
#ifndef DISABLE_AIRCOPY
#ifdef ENABLE_AIRCOPY
BOOT_MODE_AIRCOPY
#endif
};