mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-05-01 15:51:25 +03:00
Disable padding flag - causing problems with structures that need no padding
This commit is contained in:
parent
32fad129cc
commit
eea1756dc0
4
Makefile
4
Makefile
@ -13,7 +13,7 @@ ENABLE_NOAA := 0
|
|||||||
ENABLE_VOICE := 0
|
ENABLE_VOICE := 0
|
||||||
ENABLE_VOX := 0
|
ENABLE_VOX := 0
|
||||||
ENABLE_ALARM := 0
|
ENABLE_ALARM := 0
|
||||||
ENABLE_TX1750 := 0
|
ENABLE_TX1750 := 1
|
||||||
ENABLE_BIG_FREQ := 0
|
ENABLE_BIG_FREQ := 0
|
||||||
ENABLE_SMALL_BOLD := 1
|
ENABLE_SMALL_BOLD := 1
|
||||||
ENABLE_KEEP_MEM_NAME := 1
|
ENABLE_KEEP_MEM_NAME := 1
|
||||||
@ -172,7 +172,7 @@ ifeq ($(ENABLE_LTO), 1)
|
|||||||
CFLAGS += -flto=2
|
CFLAGS += -flto=2
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS += -Wpadded
|
#CFLAGS += -Wpadded
|
||||||
CFLAGS += -DPRINTF_INCLUDE_CONFIG_H
|
CFLAGS += -DPRINTF_INCLUDE_CONFIG_H
|
||||||
CFLAGS += -DGIT_HASH=\"$(GIT_HASH)\"
|
CFLAGS += -DGIT_HASH=\"$(GIT_HASH)\"
|
||||||
ifeq ($(ENABLE_SWD),1)
|
ifeq ($(ENABLE_SWD),1)
|
||||||
|
31
app/menu.c
31
app/menu.c
@ -51,7 +51,7 @@
|
|||||||
void writeXtalFreqCal(const int32_t value, const bool update_eeprom)
|
void writeXtalFreqCal(const int32_t value, const bool update_eeprom)
|
||||||
{
|
{
|
||||||
BK4819_WriteRegister(BK4819_REG_3B, 22656 + value);
|
BK4819_WriteRegister(BK4819_REG_3B, 22656 + value);
|
||||||
|
|
||||||
if (update_eeprom)
|
if (update_eeprom)
|
||||||
{
|
{
|
||||||
struct
|
struct
|
||||||
@ -62,9 +62,9 @@
|
|||||||
uint8_t VOLUME_GAIN;
|
uint8_t VOLUME_GAIN;
|
||||||
uint8_t DAC_GAIN;
|
uint8_t DAC_GAIN;
|
||||||
} __attribute__((packed)) misc;
|
} __attribute__((packed)) misc;
|
||||||
|
|
||||||
gEeprom.BK4819_XTAL_FREQ_LOW = value;
|
gEeprom.BK4819_XTAL_FREQ_LOW = value;
|
||||||
|
|
||||||
// radio 1 .. 04 00 46 00 50 00 2C 0E
|
// radio 1 .. 04 00 46 00 50 00 2C 0E
|
||||||
// radio 2 .. 05 00 46 00 50 00 2C 0E
|
// radio 2 .. 05 00 46 00 50 00 2C 0E
|
||||||
//
|
//
|
||||||
@ -431,7 +431,7 @@ void MENU_AcceptSetting(void)
|
|||||||
|
|
||||||
BK4819_SetCTCSSFrequency(CTCSS_Options[Code]);
|
BK4819_SetCTCSSFrequency(CTCSS_Options[Code]);
|
||||||
}
|
}
|
||||||
|
|
||||||
gRequestSaveChannel = 1;
|
gRequestSaveChannel = 1;
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -758,19 +758,24 @@ void MENU_AcceptSetting(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
case MENU_BATCAL:
|
case MENU_BATCAL:
|
||||||
gBatteryCalibration[0] = 520*gSubMenuSelection/760; //5.2V empty, blinking above this value, reduced functionality below
|
{
|
||||||
gBatteryCalibration[1] = 700*gSubMenuSelection/760; // 7V, ~5%, 1 bars above this value
|
uint16_t buf[4];
|
||||||
gBatteryCalibration[2] = 745*gSubMenuSelection/760; // 7.45V, ~17%, 2 bars above this value
|
|
||||||
gBatteryCalibration[3] = gSubMenuSelection; // 7.6V, ~29%, 3 bars above this value
|
gBatteryCalibration[0] = (520ul * gSubMenuSelection) / 760; // 5.20V empty, blinking above this value, reduced functionality below
|
||||||
gBatteryCalibration[4] = 788*gSubMenuSelection/760; // 7.88V, ~65% 4 bars above this value
|
gBatteryCalibration[1] = (700ul * gSubMenuSelection) / 760; // 7.00V, ~5%, 1 bars above this value
|
||||||
|
gBatteryCalibration[2] = (745ul * gSubMenuSelection) / 760; // 7.45V, ~17%, 2 bars above this value
|
||||||
|
gBatteryCalibration[3] = gSubMenuSelection; // 7.6V, ~29%, 3 bars above this value
|
||||||
|
gBatteryCalibration[4] = (788ul * gSubMenuSelection) / 760; // 7.88V, ~65%, 4 bars above this value
|
||||||
gBatteryCalibration[5] = 2300;
|
gBatteryCalibration[5] = 2300;
|
||||||
EEPROM_WriteBuffer(0x1F40, gBatteryCalibration);
|
EEPROM_WriteBuffer(0x1F40, gBatteryCalibration);
|
||||||
uint16_t buf[4];
|
|
||||||
EEPROM_ReadBuffer(0x1F48, buf, sizeof(buf));
|
EEPROM_ReadBuffer( 0x1F48, buf, sizeof(buf));
|
||||||
buf[0] = gBatteryCalibration[4];
|
buf[0] = gBatteryCalibration[4];
|
||||||
buf[1] = gBatteryCalibration[5];
|
buf[1] = gBatteryCalibration[5];
|
||||||
EEPROM_WriteBuffer(0x1F48, buf);
|
EEPROM_WriteBuffer(0x1F48, buf);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gRequestSaveSettings = true;
|
gRequestSaveSettings = true;
|
||||||
@ -932,7 +937,7 @@ void MENU_ShowCurrentSetting(void)
|
|||||||
gSubMenuSelection = gEeprom.VOX_SWITCH ? gEeprom.VOX_LEVEL + 1 : 0;
|
gSubMenuSelection = gEeprom.VOX_SWITCH ? gEeprom.VOX_LEVEL + 1 : 0;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
case MENU_ABR:
|
case MENU_ABR:
|
||||||
gSubMenuSelection = gEeprom.BACKLIGHT;
|
gSubMenuSelection = gEeprom.BACKLIGHT;
|
||||||
|
|
||||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user