...
|
...
|
@@ -14,7 +14,7 @@
|
14
|
14
|
#define LINEBOTTOM 72
|
15
|
15
|
//Battery see : http://community.m5stack.com/topic/1361/ischarging-and-getbatterylevel/5
|
16
|
16
|
#define VMAX 4000.0f // Observed Maximum: 4161.3 after 7h charge
|
17
|
|
- #define VMIN 2973.0f // Observed Minimum: 2973.0
|
|
17
|
+ #define VMIN 2700.0f // Observed Minimum: 2692.0
|
18
|
18
|
#define COLUMN_BAT 80
|
19
|
19
|
#elif ARDUINO_HELTEC_WIFI_LORA_32
|
20
|
20
|
#define LINEBOTTOM 54
|
...
|
...
|
@@ -65,6 +65,7 @@ void DisplayButtonStatus() {
|
65
|
65
|
M5.Lcd.setTextColor(0x7bef, BLACK);
|
66
|
66
|
M5.Lcd.setCursor(0, LINE1, 1);M5.Lcd.println("BT: "+String(macStr));
|
67
|
67
|
M5.Lcd.setCursor(0, LINE2, 1);M5.Lcd.println("I : "+String(instanceStr));
|
|
68
|
+ M5.Lcd.fillRect(0, LINE4, 160, 15, BLACK);
|
68
|
69
|
M5.Lcd.setCursor(0, LINE4, 2);M5.Lcd.setTextColor(GREEN, BLACK); M5.Lcd.println(beaconTypeStr);
|
69
|
70
|
M5.Lcd.setCursor(0, LINE6, 1);M5.Lcd.setTextColor(0x7bef, BLACK); M5.Lcd.println( "Cnt: "+String(beacon_count));
|
70
|
71
|
if( 1 == ad_running ) {
|
...
|
...
|
@@ -76,6 +77,7 @@ void DisplayButtonStatus() {
|
76
|
77
|
float BatteryPercent = 100*(BatteryValue-VMIN)/ (VMAX-VMIN);
|
77
|
78
|
float BatteryLevel = getBatteryLevel();
|
78
|
79
|
if( BatteryPercent > 100 ) BatteryPercent = 100;
|
|
80
|
+ else if( BatteryPercent < 0 ) BatteryPercent = 0;
|
79
|
81
|
M5.Lcd.setTextColor(0x7bef, BLACK);
|
80
|
82
|
M5.Lcd.setCursor(0, LINEBOTTOM, 1);
|
81
|
83
|
M5.Lcd.fillRect(0, LINEBOTTOM, 50, 10, BLACK);
|