mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-06-20 15:08:37 +03:00
fix dual watch bug + other stuff
This commit is contained in:
@ -17,11 +17,11 @@
|
||||
#include "battery.h"
|
||||
#include "driver/backlight.h"
|
||||
#include "misc.h"
|
||||
#include "settings.h"
|
||||
#include "ui/battery.h"
|
||||
#include "ui/menu.h"
|
||||
#include "ui/ui.h"
|
||||
|
||||
uint16_t g_battery_calibration[6];
|
||||
uint16_t g_usb_current_voltage;
|
||||
uint16_t g_usb_current;
|
||||
uint16_t g_battery_voltages[4];
|
||||
@ -86,25 +86,25 @@ void BATTERY_GetReadings(const bool bDisplayBatteryLevel)
|
||||
|
||||
g_battery_display_level = 0;
|
||||
|
||||
if (g_battery_calibration[5] < Voltage)
|
||||
if (g_eeprom.calib.battery[5] < Voltage)
|
||||
g_battery_display_level = 6;
|
||||
else
|
||||
if (g_battery_calibration[4] < Voltage)
|
||||
if (g_eeprom.calib.battery[4] < Voltage)
|
||||
g_battery_display_level = 5;
|
||||
else
|
||||
if (g_battery_calibration[3] < Voltage)
|
||||
if (g_eeprom.calib.battery[3] < Voltage)
|
||||
g_battery_display_level = 4;
|
||||
else
|
||||
if (g_battery_calibration[2] < Voltage)
|
||||
if (g_eeprom.calib.battery[2] < Voltage)
|
||||
g_battery_display_level = 3;
|
||||
else
|
||||
if (g_battery_calibration[1] < Voltage)
|
||||
if (g_eeprom.calib.battery[1] < Voltage)
|
||||
g_battery_display_level = 2;
|
||||
else
|
||||
if (g_battery_calibration[0] < Voltage)
|
||||
if (g_eeprom.calib.battery[0] < Voltage)
|
||||
g_battery_display_level = 1;
|
||||
|
||||
g_battery_voltage_average = (Voltage * 760) / g_battery_calibration[3];
|
||||
g_battery_voltage_average = (Voltage * 760) / g_eeprom.calib.battery[3];
|
||||
|
||||
if ((g_current_display_screen == DISPLAY_MENU) && g_menu_cursor == MENU_VOLTAGE)
|
||||
g_update_display = true;
|
||||
|
Reference in New Issue
Block a user