Merge pull request #31 from ohmytime/main
Adjust bat ADC's for portable
This commit is contained in:
+2
-2
@@ -135,7 +135,7 @@ unsigned int MWHighEdgeSet;
|
|||||||
unsigned int MWLowEdgeSet;
|
unsigned int MWLowEdgeSet;
|
||||||
unsigned int SWHighEdgeSet;
|
unsigned int SWHighEdgeSet;
|
||||||
unsigned int SWLowEdgeSet;
|
unsigned int SWLowEdgeSet;
|
||||||
byte showSWMIBand = 1; // Fix Me: Menu options: 0: don't show 1: show up
|
byte showSWMIBand = 1;
|
||||||
uint16_t SWMIBandPos;
|
uint16_t SWMIBandPos;
|
||||||
uint16_t SWMIBandPosold; // Fix Me: Should store this parameter into flash, for use of restart.
|
uint16_t SWMIBandPosold; // Fix Me: Should store this parameter into flash, for use of restart.
|
||||||
String SWMIBandstring = String();
|
String SWMIBandstring = String();
|
||||||
@@ -3450,7 +3450,7 @@ void ShowRSSI() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ShowBattery() {
|
void ShowBattery() {
|
||||||
battery = map(constrain(analogRead(BATTERY_PIN), 1965, 2300), 1965, 2300, 0, 4);
|
battery = map(constrain(analogRead(BATTERY_PIN), BAT_LEVEL_EMPTY, BAT_LEVEL_FULL), BAT_LEVEL_EMPTY, BAT_LEVEL_FULL, 0, BAT_LEVEL_STAGE);
|
||||||
if (batteryold != battery) {
|
if (batteryold != battery) {
|
||||||
tft.drawRect(300, 8, 12, 20, TFT_WHITE);
|
tft.drawRect(300, 8, 12, 20, TFT_WHITE);
|
||||||
tft.fillRect(303, 4, 6, 4, TFT_WHITE);
|
tft.fillRect(303, 4, 6, 4, TFT_WHITE);
|
||||||
|
|||||||
@@ -19,6 +19,11 @@ enum RADIO_TUNE_MODE {
|
|||||||
TUNE_MAN, TUNE_AUTO, TUNE_MEM, TUNE_MI_BAND
|
TUNE_MAN, TUNE_AUTO, TUNE_MEM, TUNE_MI_BAND
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define BAT_LEVEL_EMPTY 1600
|
||||||
|
#define BAT_LEVEL_WARN 1700
|
||||||
|
#define BAT_LEVEL_FULL 2270
|
||||||
|
#define BAT_LEVEL_STAGE 4
|
||||||
|
|
||||||
#define FREQ_MW_STEP_9K 9
|
#define FREQ_MW_STEP_9K 9
|
||||||
#define FREQ_MW_STEP_10K 10
|
#define FREQ_MW_STEP_10K 10
|
||||||
#define FREQ_SW_STEP_5K 5
|
#define FREQ_SW_STEP_5K 5
|
||||||
|
|||||||
Reference in New Issue
Block a user