Skip to content

Commit ab91718

Browse files
committed
Remove tune holdoff feature
1 parent cdc8487 commit ab91718

File tree

9 files changed

+4
-79
lines changed

9 files changed

+4
-79
lines changed

ats-mini/Common.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,6 @@ extern SI4735_fixed rx;
129129
extern TFT_eSprite spr;
130130
extern TFT_eSPI tft;
131131

132-
extern bool tuning_flag;
133-
extern uint8_t tuneHoldOff;
134132
extern bool pushAndRotate;
135133
extern bool seekStop;
136134
extern uint8_t rssi;

ats-mini/Draw.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -426,9 +426,6 @@ void drawScreen(const char *statusLine1, const char *statusLine2)
426426
{
427427
if(sleepOn()) return;
428428

429-
// Do not update the screen while tuning (if enabled)
430-
if(tuneHoldOff && tuning_flag) return;
431-
432429
// Clear screen buffer
433430
spr.fillSprite(TH.bg);
434431

ats-mini/Network.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -387,9 +387,8 @@ void webSetConfig(AsyncWebServerRequest *request)
387387
prefsSave |= SAVE_SETTINGS;
388388
}
389389

390-
// Save scroll direction, tuning hold off, and menu zoom
390+
// Save scroll direction and menu zoom
391391
scrollDirection = request->hasParam("scroll", true)? -1 : 1;
392-
tuneHoldOff = request->getParam("holdoff", true)->value().toInt();
393392
zoomMenu = request->hasParam("zoom", true);
394393
prefsSave |= SAVE_SETTINGS;
395394

@@ -690,11 +689,6 @@ const String webConfigPage()
690689
"<TD CLASS='LABEL'>Reverse Scrolling</TD>"
691690
"<TD><INPUT TYPE='CHECKBOX' NAME='scroll' VALUE='on'" +
692691
(scrollDirection<0? " CHECKED ":"") + "></TD>"
693-
"</TR>"
694-
"<TR>"
695-
"<TD CLASS='LABEL'>Tuning Display Delay</TD>"
696-
"<TD><INPUT TYPE='NUMBER' NAME='holdoff' VALUE='" +
697-
tuneHoldOff + "' MIN='0' MAX='255'></TD>"
698692
"</TR>"
699693
"<TR>"
700694
"<TD CLASS='LABEL'>Zoomed Menu</TD>"

ats-mini/Storage.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ void prefsSave(uint32_t items)
188188
prefs.putUChar("SleepMode", sleepModeIdx); // Sleep mode
189189
prefs.putUChar("ZoomMenu", zoomMenu); // TRUE: Zoom menu
190190
prefs.putBool("ScrollDir", scrollDirection<0); // TRUE: Reverse scroll
191-
prefs.putUChar("TuneHoldOff", tuneHoldOff); // Tuning hold off
192191
prefs.putUChar("UTCOffset", utcOffsetIdx); // UTC Offset
193192
prefs.putUChar("Squelch", currentSquelch); // Squelch
194193
prefs.putUChar("FmRegion", FmRegionIdx); // FM region
@@ -262,7 +261,6 @@ bool prefsLoad(uint32_t items)
262261
sleepModeIdx = prefs.getUChar("SleepMode", sleepModeIdx); // Sleep mode
263262
zoomMenu = prefs.getUChar("ZoomMenu", zoomMenu); // TRUE: Zoom menu
264263
scrollDirection = prefs.getBool("ScrollDir", scrollDirection<0)? -1:1; // TRUE: Reverse scroll
265-
tuneHoldOff = prefs.getUChar("TuneHoldOff", tuneHoldOff); // Tuning hold off
266264
utcOffsetIdx = prefs.getUChar("UTCOffset", utcOffsetIdx); // UTC Offset
267265
currentSquelch = prefs.getUChar("Squelch", currentSquelch); // Squelch
268266
FmRegionIdx = prefs.getUChar("FmRegion", FmRegionIdx); // FM region

ats-mini/ats-mini.ino

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,6 @@ int8_t scrollDirection = 1; // Menu scroll direction
7777

7878
// Background screen refresh
7979
uint32_t background_timer = millis(); // Background screen refresh timer.
80-
uint32_t tuning_timer = millis(); // Tuning hold off timer.
81-
bool tuning_flag = false; // Flag to indicate tuning
82-
uint8_t tuneHoldOff = 0; // Timer to hold off display whilst tuning
8380

8481
//
8582
// Current parameters
@@ -518,20 +515,6 @@ bool checkStopSeeking()
518515
// This function is called by the seek function process.
519516
void showFrequencySeek(uint16_t freq)
520517
{
521-
// Check if tuning flag is set
522-
if(tuneHoldOff)
523-
{
524-
if(tuning_flag)
525-
{
526-
if((millis() - tuning_timer) > tuneHoldOff)
527-
tuning_flag = false;
528-
}
529-
else
530-
{
531-
tuning_timer = millis();
532-
tuning_flag = true;
533-
}
534-
}
535518
currentFrequency = freq;
536519
drawScreen();
537520
}
@@ -547,13 +530,6 @@ bool doSeek(int16_t enc)
547530
{
548531
if(isSSB())
549532
{
550-
if(tuneHoldOff)
551-
{
552-
// Tuning timer to hold off (FM/AM) display updates
553-
tuning_flag = true;
554-
tuning_timer = millis();
555-
}
556-
557533
updateBFO(currentBFO + enc * getCurrentStep(true)->step, true);
558534
}
559535
else
@@ -565,7 +541,6 @@ bool doSeek(int16_t enc)
565541
// Flag is set by rotary encoder and cleared on seek/scan entry
566542
seekStop = false;
567543
rx.seekStationProgress(showFrequencySeek, checkStopSeeking, enc>0? 1 : 0);
568-
if(tuneHoldOff) tuning_flag = false;
569544
updateFrequency(rx.getFrequency(), true);
570545
}
571546
}
@@ -603,13 +578,6 @@ bool doTune(int16_t enc, bool fast = false)
603578
//
604579
if(isSSB())
605580
{
606-
if(tuneHoldOff)
607-
{
608-
// Tuning timer to hold off (SSB) display updates
609-
tuning_flag = true;
610-
tuning_timer = millis();
611-
}
612-
613581
uint32_t step = getCurrentStep(fast)->step;
614582
uint32_t stepAdjust = (currentFrequency * 1000 + currentBFO) % step;
615583
step = !stepAdjust? step : enc>0? step - stepAdjust : stepAdjust;
@@ -622,13 +590,6 @@ bool doTune(int16_t enc, bool fast = false)
622590
//
623591
else
624592
{
625-
if(tuneHoldOff)
626-
{
627-
// Tuning timer to hold off (FM/AM) display updates
628-
tuning_flag = true;
629-
tuning_timer = millis();
630-
}
631-
632593
uint16_t step = getCurrentStep(fast)->step;
633594
uint16_t stepAdjust = currentFrequency % step;
634595
stepAdjust = (currentMode==FM) && (step==20)? (stepAdjust+10) % step : stepAdjust;
@@ -656,13 +617,6 @@ bool doDigit(int16_t enc)
656617
// SSB tuning
657618
if(isSSB())
658619
{
659-
if(tuneHoldOff)
660-
{
661-
// Tuning timer to hold off (SSB) display updates
662-
tuning_flag = true;
663-
tuning_timer = millis();
664-
}
665-
666620
updated = updateBFO(currentBFO + enc * getFreqInputStep(), false);
667621
}
668622

@@ -671,13 +625,6 @@ bool doDigit(int16_t enc)
671625
//
672626
else
673627
{
674-
if(tuneHoldOff)
675-
{
676-
// Tuning timer to hold off (FM/AM) display updates
677-
tuning_flag = true;
678-
tuning_timer = millis();
679-
}
680-
681628
// Tune to a new frequency
682629
updated = updateFrequency(currentFrequency + enc * getFreqInputStep(), false);
683630
}
@@ -1001,13 +948,6 @@ void loop()
1001948
// Tick NETWORK time, connecting to WiFi if requested
1002949
netTickTime();
1003950

1004-
// Check if tuning flag is set
1005-
if(tuneHoldOff && tuning_flag && ((currentTime - tuning_timer) > tuneHoldOff))
1006-
{
1007-
tuning_flag = false;
1008-
needRedraw = true;
1009-
}
1010-
1011951
// Run clock
1012952
needRedraw |= clockTickTime();
1013953

changelog/+holdoff.changed.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/+holdoff.removed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove the ENABLE_HOLDOFF compile-time option.

docs/source/development.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ HALF_STEP=1 PORT=/dev/tty.usbmodem14401 make upload
4747

4848
## Decoding stack traces
4949

50-
To decode a stack trace (printed via serial port) use the following tool: https://esphome.github.io/esp-stacktrace-decoder/
50+
To decode a stack trace (printed via serial port) use the following tool: <https://esphome.github.io/esp-stacktrace-decoder/>
5151

5252
## Enabling the pre-commit hooks
5353

docs/source/manual.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,7 @@ From now on you can switch the modes as you want and connect to your receiver ei
113113
When on the go, you can set up a mobile Wi-Fi hotspot on your smartphone and use it to connect the receiver to the internet.
114114
```
115115

116-
### Receiver settings available via Wi-Fi only
117-
118-
* **Tuning Display Delay** - time in milliseconds to delay screen updates while tuning/seeking, 0 (disabled) ... 255. Makes the tuning process a bit faster because the screen is updated less often.
116+
<!-- ### Receiver settings available via Wi-Fi only -->
119117

120118
## Schedule
121119

0 commit comments

Comments
 (0)