mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-28 22:31:25 +03:00
Forgot to remove unrequired batcal code
This commit is contained in:
parent
58eced120e
commit
aafc93c2ee
@ -1289,15 +1289,6 @@ static void MENU_Key_EXIT(bool bKeyPressed, bool bKeyHeld)
|
|||||||
// ***********************
|
// ***********************
|
||||||
// restore original value
|
// restore original value
|
||||||
|
|
||||||
if (gMenuCursor == MENU_BATCAL)
|
|
||||||
{
|
|
||||||
if (gF_LOCK)
|
|
||||||
{
|
|
||||||
EEPROM_ReadBuffer(0x1F40, gBatteryCalibration, 8);
|
|
||||||
BATTERY_GetReadings(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if (gMenuCursor == MENU_F_CALI)
|
if (gMenuCursor == MENU_F_CALI)
|
||||||
{
|
{
|
||||||
// if (gF_LOCK)
|
// if (gF_LOCK)
|
||||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
41
ui/main.c
41
ui/main.c
@ -187,18 +187,12 @@ void UI_UpdateRSSI(const int16_t rssi, const int vfo)
|
|||||||
if (!center_line_is_free)
|
if (!center_line_is_free)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const bool rx = (gCurrentFunction == FUNCTION_RECEIVE ||
|
if (gCurrentFunction == FUNCTION_RECEIVE ||
|
||||||
gCurrentFunction == FUNCTION_MONITOR ||
|
gCurrentFunction == FUNCTION_MONITOR ||
|
||||||
gCurrentFunction == FUNCTION_INCOMING);
|
gCurrentFunction == FUNCTION_INCOMING)
|
||||||
|
{
|
||||||
#if defined(ENABLE_AM_FIX) && defined(ENABLE_AM_FIX_SHOW_DATA)
|
UI_DisplayRSSIBar(rssi, true);
|
||||||
if (gEeprom.VfoInfo[gEeprom.RX_CHANNEL].AM_mode && gSetting_AM_fix)
|
}
|
||||||
{ // AM test data is currently being shown
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
if (rx)
|
|
||||||
UI_DisplayRSSIBar(rssi, true);
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
@ -296,7 +290,7 @@ void UI_DisplayMain(void)
|
|||||||
char String[16];
|
char String[16];
|
||||||
unsigned int vfo_num;
|
unsigned int vfo_num;
|
||||||
|
|
||||||
// true is the center screen line is not in use
|
// true if the center screen line is available to use
|
||||||
center_line_is_free = true;
|
center_line_is_free = true;
|
||||||
|
|
||||||
// #ifdef SINGLE_VFO_CHAN
|
// #ifdef SINGLE_VFO_CHAN
|
||||||
@ -704,7 +698,10 @@ void UI_DisplayMain(void)
|
|||||||
|
|
||||||
#ifdef ENABLE_AUDIO_BAR
|
#ifdef ENABLE_AUDIO_BAR
|
||||||
if (gSetting_mic_bar && gCurrentFunction == FUNCTION_TRANSMIT)
|
if (gSetting_mic_bar && gCurrentFunction == FUNCTION_TRANSMIT)
|
||||||
|
{
|
||||||
UI_DisplayAudioBar();
|
UI_DisplayAudioBar();
|
||||||
|
center_line_is_free = false;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -713,13 +710,17 @@ void UI_DisplayMain(void)
|
|||||||
{
|
{
|
||||||
AM_fix_print_data(gEeprom.RX_CHANNEL, String);
|
AM_fix_print_data(gEeprom.RX_CHANNEL, String);
|
||||||
UI_PrintStringSmall(String, 2, 0, 3);
|
UI_PrintStringSmall(String, 2, 0, 3);
|
||||||
|
center_line_is_free = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_RSSI_BAR
|
#ifdef ENABLE_RSSI_BAR
|
||||||
if (rx)
|
if (rx)
|
||||||
|
{
|
||||||
UI_DisplayRSSIBar(gCurrentRSSI[gEeprom.RX_CHANNEL], false);
|
UI_DisplayRSSIBar(gCurrentRSSI[gEeprom.RX_CHANNEL], false);
|
||||||
|
center_line_is_free = false;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -733,6 +734,7 @@ void UI_DisplayMain(void)
|
|||||||
strcpy(String, "DTMF ");
|
strcpy(String, "DTMF ");
|
||||||
strcat(String, gDTMF_RX_live + idx);
|
strcat(String, gDTMF_RX_live + idx);
|
||||||
UI_PrintStringSmall(String, 2, 0, 3);
|
UI_PrintStringSmall(String, 2, 0, 3);
|
||||||
|
center_line_is_free = false;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (gSetting_live_DTMF_decoder && gDTMF_RX_index > 0)
|
if (gSetting_live_DTMF_decoder && gDTMF_RX_index > 0)
|
||||||
@ -742,6 +744,7 @@ void UI_DisplayMain(void)
|
|||||||
strcpy(String, "DTMF ");
|
strcpy(String, "DTMF ");
|
||||||
strcat(String, gDTMF_RX + idx);
|
strcat(String, gDTMF_RX + idx);
|
||||||
UI_PrintStringSmall(String, 2, 0, 3);
|
UI_PrintStringSmall(String, 2, 0, 3);
|
||||||
|
center_line_is_free = false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -749,15 +752,11 @@ void UI_DisplayMain(void)
|
|||||||
else
|
else
|
||||||
if (gChargingWithTypeC)
|
if (gChargingWithTypeC)
|
||||||
{ // charging .. show the battery state
|
{ // charging .. show the battery state
|
||||||
|
sprintf(String, "Charge %u.%02uV %u%%",
|
||||||
//const uint16_t volts = (gBatteryVoltageAverage < gMin_bat_v) ? gMin_bat_v : gBatteryVoltageAverage;
|
gBatteryVoltageAverage / 100, gBatteryVoltageAverage % 100,
|
||||||
//const uint16_t percent = (100 * (volts - gMin_bat_v)) / (gMax_bat_v - gMin_bat_v);
|
BATTERY_VoltsToPercent(gBatteryVoltageAverage));
|
||||||
//sprintf(String, "Charge %u.%02uV %u%%", gBatteryVoltageAverage / 100, gBatteryVoltageAverage % 100, percent);
|
|
||||||
//UI_PrintStringSmall(String, 2, 0, 3);
|
|
||||||
|
|
||||||
const uint16_t percent = BATTERY_VoltsToPercent(gBatteryVoltageAverage);
|
|
||||||
sprintf(String, "Charge %u.%02uV %u%%", gBatteryVoltageAverage / 100, gBatteryVoltageAverage % 100, percent);
|
|
||||||
UI_PrintStringSmall(String, 2, 0, 3);
|
UI_PrintStringSmall(String, 2, 0, 3);
|
||||||
|
center_line_is_free = false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
18
ui/menu.c
18
ui/menu.c
@ -733,21 +733,9 @@ void UI_DisplayMenu(void)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case MENU_VOL:
|
case MENU_VOL:
|
||||||
if (gF_LOCK)
|
sprintf(String, "%u.%02uV\n%u%%",
|
||||||
{
|
gBatteryVoltageAverage / 100, gBatteryVoltageAverage % 100,
|
||||||
gBatteryCalibration[3] = gSubMenuSelection;
|
BATTERY_VoltsToPercent(gBatteryVoltageAverage));
|
||||||
BATTERY_GetReadings(true);
|
|
||||||
sprintf(String, "%u.%02uV\n%u%%\n%u",
|
|
||||||
gBatteryVoltageAverage / 100, gBatteryVoltageAverage % 100,
|
|
||||||
BATTERY_VoltsToPercent(gBatteryVoltageAverage),
|
|
||||||
gSubMenuSelection);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sprintf(String, "%u.%02uV\n%u%%",
|
|
||||||
gBatteryVoltageAverage / 100, gBatteryVoltageAverage % 100,
|
|
||||||
BATTERY_VoltsToPercent(gBatteryVoltageAverage));
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MENU_RESET:
|
case MENU_RESET:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user