Skip to content

Commit

Permalink
Add ENABLE_BIGGER_BATTERY_SAVE
Browse files Browse the repository at this point in the history
  • Loading branch information
spm81 committed Mar 17, 2024
1 parent 3adc33d commit 0c66b28
Show file tree
Hide file tree
Showing 6 changed files with 259 additions and 236 deletions.
49 changes: 27 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ ENABLE_REMOTEKILL := 0
# 1750Hz & 1050Hz FN1 FN2 Tones
ENABLE_DTMF_SIDETONES := 1
ENABLE_TX1750 := 0

# Keep this in stock options, and add option in mods for extra rogers
ENABLE_ROGER_DEFAULT := 0
ENABLE_ROGER_MOTOTRBO := 0
Expand All @@ -29,42 +30,44 @@ ENABLE_ROGER_MOTOTRBOTLKRT80 := 0
ENABLE_ROGER_ROGERCOBRAAM845 := 1
ENABLE_ROGER_POLICE_ITA := 0
ENABLE_ROGER_UV5RC := 0
ENABLE_ROGER_MARIO := 0
ENABLE_ROGER_MARIO := 1
ENABLE_MDC := 0

#============== MODIFICATIONS =============#
# AM Modulation Fix - 544 bytes
ENABLE_AM_FIX := 0
ENABLE_AM_FIX := 0
# Apply fix to Spectrum - 40 bytes
ENABLE_AM_FIX_ON_SPECTRUM := 0
ENABLE_SQUELCH_MORE_SENSITIVE := 0
ENABLE_SHOW_SQUELCH_LEVEL := 1
ENABLE_AM_FIX_ON_SPECTRUM := 0
ENABLE_SQUELCH_MORE_SENSITIVE := 0
ENABLE_SHOW_SQUELCH_LEVEL := 1
# Restore FM in 1 second after RX - 0 bytes
ENABLE_FMRADIO_FAST_RESTORE := 1
ENABLE_FMRADIO_FAST_RESTORE := 1
# Scan List Editor
ENABLE_SCANLIST := 1
ENABLE_SCANLIST := 1
ENABLE_MISSED_CALL_NOTIFICATION_AND_BLINKING_LED := 1
ENABLE_PTT_HOLD := 1
# Enable Bigger Battery Save
ENABLE_BIGGER_BATTERY_SAVE := 1
# Battery percentage at the Welcome Message - 12 bytes
ENABLE_VOLTAGE_PERCENTAGE_WELCOME_MESSAGE := 1
ENABLE_VOLTAGE_PERCENTAGE_WELCOME_MESSAGE := 1
# Battery percentage - 296 bytes
ENABLE_STATUS_BATTERY_PERC := 1
ENABLE_STATUS_BATTERY_PERC := 1
# Show current while charging - 136 bytes Thanks Tunas1337
ENABLE_BATTERY_CHARGING := 1
ENABLE_BATTERY_CHARGING := 1
# Invert LCD Colors
ENABLE_LCD_INVERT_OPTION := 0
#ENABLE_LCD_CONTRAST_OPTION := 0 # WIP
ENABLE_LCD_INVERT_OPTION := 0
#ENABLE_LCD_CONTRAST_OPTION := 0 # WIP
# Mic Gain Bar while TXing - 255 bytes
ENABLE_MIC_PLUS_GAIN_BAR_TX := 1
ENABLE_MIC_PLUS_GAIN_BAR_TX := 1
# Enable Vox 1920ms(max) delay - 0 bytes
ENABLE_VOX_MAX_DELAY := 1
ENABLE_NOSCANTIMEOUT := 1
ENABLE_KEEPNAMEONSAVE := 1
ENABLE_FASTER_CHANNEL_SCAN := 1
ENABLE_VOX_MAX_DELAY := 1
ENABLE_NOSCANTIMEOUT := 1
ENABLE_KEEPNAMEONSAVE := 1
ENABLE_FASTER_CHANNEL_SCAN := 1
# Enable Timeout beep at the end of timeout - 44 bytes
ENABLE_TIMEOUT_ROGERBEEP_NOTIFICATION := 1
ENABLE_TIMEOUT_ROGERBEEP_NOTIFICATION := 1
# CW Modulation
ENABLE_CW := 1
ENABLE_CW := 1

#=============== EXTRA: MESSENGER ===============#
ENABLE_MESSENGER := 1
Expand Down Expand Up @@ -254,7 +257,7 @@ ifeq ($(OS),Windows_NT)
RM = del /Q
FixPath = $(subst /,\,$1)
WHERE = where
K5PROG = utils/k5prog/k5prog.exe -F -YYYYY -p /dev/com3 -b
K5PROG = utils/k5prog/k5prog.exe -F -YYYYY -p /dev/com5 -b
else
TOP := $(shell pwd)
RM = rm -f
Expand Down Expand Up @@ -418,7 +421,6 @@ endif
ifeq ($(ENABLE_LOGO),1)
CFLAGS += -DENABLE_LOGO
endif

#LDFLAGS += -z noexecstack -mcpu=cortex-m0 -nostartfiles -Wl,-L,linker -Wl,-T,firmware.ld -Wl,--gc-sections
LDFLAGS = -mcpu=cortex-m0 -nostartfiles -Wl,-T,firmware.ld
## 2 LDFLAGS = -mcpu=cortex-m0 -nostartfiles -Wl,-T,firmware.ld,--gc-sections
Expand All @@ -438,6 +440,9 @@ endif
ifeq ($(ENABLE_MISSED_CALL_NOTIFICATION_AND_BLINKING_LED),1)
CFLAGS += -DENABLE_MISSED_CALL_NOTIFICATION_AND_BLINKING_LED
endif
ifeq ($(ENABLE_BIGGER_BATTERY_SAVE),1)
CFLAGS += -DENABLE_BIGGER_BATTERY_SAVE
endif
ifeq ($(ENABLE_NOSCANTIMEOUT),1)
CFLAGS += -DENABLE_NOSCANTIMEOUT
endif
Expand Down Expand Up @@ -521,7 +526,7 @@ all: $(TARGET)
@echo Create $(notdir $<.bin)
@$(OBJCOPY) -O binary $< $<.bin
@echo Create $(notdir $<.packed.bin)
@-$(MY_PYTHON) utils/fw-pack.py $<.bin MATOZ $(GIT_HASH) $<.packed.bin
@-$(MY_PYTHON) utils/fw-pack.py $<.bin MCFW $(GIT_HASH) $<.packed.bin

debug:
/opt/openocd/bin/openocd -c "bindto 0.0.0.0" -f interface/jlink.cfg -f dp32g030.cfg
Expand Down
2 changes: 1 addition & 1 deletion app/app.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ static void FREQ_NextChannel(void) {
RADIO_SetupRegisters(true);
gUpdateDisplay = true;
#ifdef ENABLE_FASTER_CHANNEL_SCAN
ScanPauseDelayIn10msec = 2; // 6 = 60ms
ScanPauseDelayIn10msec = 6; // 6 = 60ms
#else
ScanPauseDelayIn10msec = 10;
#endif
Expand Down
4 changes: 2 additions & 2 deletions app/chFrScanner.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ static void NextFreqChannel(void)
RADIO_SetupRegisters(true);

#ifdef ENABLE_FASTER_CHANNEL_SCAN
gScanPauseDelayIn_10ms = 9; // 90ms
gScanPauseDelayIn_10ms = 6; // 90ms
#else
gScanPauseDelayIn_10ms = scan_pause_delay_in_6_10ms;
#endif
Expand Down Expand Up @@ -262,7 +262,7 @@ static void NextMemChannel(void)
}

#ifdef ENABLE_FASTER_CHANNEL_SCAN
gScanPauseDelayIn_10ms = 9; // 90ms .. <= ~60ms it misses signals (squelch response and/or PLL lock time) ?
gScanPauseDelayIn_10ms = 6; // 90ms .. <= ~60ms it misses signals (squelch response and/or PLL lock time) ?
#else
gScanPauseDelayIn_10ms = scan_pause_delay_in_3_10ms;
#endif
Expand Down
Loading

0 comments on commit 0c66b28

Please sign in to comment.