Low Bat Information Display tuned
This commit is contained in:
parent
2a101b7b88
commit
5e6f4b6a84
@ -241,7 +241,7 @@ String macToString(const unsigned char *mac)
|
|||||||
|
|
||||||
void SevenSeg_Output()
|
void SevenSeg_Output()
|
||||||
{
|
{
|
||||||
if (globals.battery_level < BAT_LOW_PERCENT)
|
if (globals.battery_level < BAT_LOW_PERCENT && millis() % 10000 > 7000)
|
||||||
{
|
{
|
||||||
disp_FAC_1.setBrightness(0);
|
disp_FAC_1.setBrightness(0);
|
||||||
disp_FAC_2.setBrightness(0);
|
disp_FAC_2.setBrightness(0);
|
||||||
@ -249,7 +249,7 @@ void SevenSeg_Output()
|
|||||||
|
|
||||||
disp_FAC_3.setSegments(sevenSeg_bat);
|
disp_FAC_3.setSegments(sevenSeg_bat);
|
||||||
disp_FAC_2.setSegments(sevenSeg_low);
|
disp_FAC_2.setSegments(sevenSeg_low);
|
||||||
if (millis() % 5000 > 2500)
|
if (millis() % 3000 < 1500)
|
||||||
disp_FAC_1.showNumberDec(globals.battery_level);
|
disp_FAC_1.showNumberDec(globals.battery_level);
|
||||||
else
|
else
|
||||||
disp_FAC_1.showNumberDecEx(globals.loadvoltage * 100, 0x40);
|
disp_FAC_1.showNumberDecEx(globals.loadvoltage * 100, 0x40);
|
||||||
@ -298,7 +298,6 @@ void FactionTicker_callback()
|
|||||||
|
|
||||||
void inputGetterTicker_callback()
|
void inputGetterTicker_callback()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (digitalRead(DIO_FAC_1_TRG) + digitalRead(DIO_FAC_2_TRG) + !digitalRead(DIO_FAC_3_TRG) < 2)
|
if (digitalRead(DIO_FAC_1_TRG) + digitalRead(DIO_FAC_2_TRG) + !digitalRead(DIO_FAC_3_TRG) < 2)
|
||||||
{
|
{
|
||||||
Serial.println("ERROR: More than one Flag active - setting no Faction active");
|
Serial.println("ERROR: More than one Flag active - setting no Faction active");
|
||||||
@ -318,7 +317,6 @@ void inputGetterTicker_callback()
|
|||||||
|
|
||||||
void powerMonitorTicker_callback()
|
void powerMonitorTicker_callback()
|
||||||
{
|
{
|
||||||
|
|
||||||
// loadvoltage and percentage is global, because of battery Monitoring
|
// loadvoltage and percentage is global, because of battery Monitoring
|
||||||
|
|
||||||
float shuntvoltage = 0;
|
float shuntvoltage = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user