efficiency display and display alignement fixes
This commit is contained in:
parent
e82675c36d
commit
73fc09154f
|
@ -120,7 +120,7 @@ void display_drivingDisplay(ESCSerialComm& escFront, ESCSerialComm& escRear) {
|
||||||
display.print("km/h");
|
display.print("km/h");
|
||||||
|
|
||||||
//A
|
//A
|
||||||
display.setCursor(SCREEN_WIDTH-35,1);
|
display.setCursor(SCREEN_WIDTH-37,1);
|
||||||
static float averaged_filtered_currentAll;
|
static float averaged_filtered_currentAll;
|
||||||
#define CURRENT_FILTER 0.8
|
#define CURRENT_FILTER 0.8
|
||||||
averaged_filtered_currentAll=averaged_filtered_currentAll*CURRENT_FILTER+(1-CURRENT_FILTER)*filtered_currentAll; //filter over time
|
averaged_filtered_currentAll=averaged_filtered_currentAll*CURRENT_FILTER+(1-CURRENT_FILTER)*filtered_currentAll; //filter over time
|
||||||
|
@ -137,18 +137,17 @@ void display_drivingDisplay(ESCSerialComm& escFront, ESCSerialComm& escRear) {
|
||||||
display.setCursor(1,SCREEN_HEIGHT-7);
|
display.setCursor(1,SCREEN_HEIGHT-7);
|
||||||
|
|
||||||
if (((millis()/2500)%2)==0) {
|
if (((millis()/2500)%2)==0) {
|
||||||
//## Trip
|
//## Speed statistic
|
||||||
|
display.print("max: ");
|
||||||
dtostrf(max_meanSpeed*3.6,1,0,buf);
|
dtostrf(max_meanSpeed*3.6,1,0,buf);
|
||||||
display.print((String)buf);
|
display.print((String)buf);
|
||||||
display.print("max: ");
|
|
||||||
display.print("km/h");
|
display.print("km/h");
|
||||||
}else{
|
}else{
|
||||||
//## Current Consumed
|
//## Current Consumed
|
||||||
dtostrf(min_filtered_currentAll,1,1,buf);
|
dtostrf(min_filtered_currentAll,1,1,buf);
|
||||||
display.print("min:");
|
display.print("min:");
|
||||||
display.print((String)buf);
|
display.print((String)buf);
|
||||||
display.print("A, max: ");
|
display.print("A max:");
|
||||||
|
|
||||||
dtostrf(max_filtered_currentAll,1,1,buf);
|
dtostrf(max_filtered_currentAll,1,1,buf);
|
||||||
display.print((String)buf);
|
display.print((String)buf);
|
||||||
|
@ -188,20 +187,22 @@ void display_standingDisplay(ESCSerialComm& escFront, ESCSerialComm& escRear) {
|
||||||
display.println();
|
display.println();
|
||||||
|
|
||||||
display.print(F("Trip:"));
|
display.print(F("Trip:"));
|
||||||
dtostrf(escFront.getTrip(),1,0,buf);
|
dtostrf(min(escFront.getTrip(),escRear.getTrip()),1,0,buf);
|
||||||
display.print((String)buf);
|
|
||||||
display.print("/");
|
|
||||||
dtostrf(escRear.getTrip(),1,0,buf);
|
|
||||||
display.print((String)buf);
|
display.print((String)buf);
|
||||||
display.print(" m ");
|
display.print(" m ");
|
||||||
display.println();
|
|
||||||
|
|
||||||
display.print(F("Cons. "));
|
|
||||||
dtostrf(escFront.getCurrentConsumed()+escRear.getCurrentConsumed(),1,2,buf);
|
dtostrf(escFront.getCurrentConsumed()+escRear.getCurrentConsumed(),1,2,buf);
|
||||||
display.print((String)buf);
|
display.print((String)buf);
|
||||||
display.print(" Ah");
|
display.print(" Ah");
|
||||||
display.println();
|
display.println();
|
||||||
|
|
||||||
|
display.print(F("Eff: "));
|
||||||
|
dtostrf( min(escFront.getTrip(),escRear.getTrip())/1000/(escFront.getCurrentConsumed()+escRear.getCurrentConsumed()) ,1,2,buf);
|
||||||
|
display.print((String)buf);
|
||||||
|
display.print(" km/Ah");
|
||||||
|
|
||||||
|
|
||||||
|
display.println();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,7 @@ void led_update(unsigned long loopmillis,ESCSerialComm& escFront, ESCSerialComm&
|
||||||
if (reverse_enabled) {
|
if (reverse_enabled) {
|
||||||
_bgColor=strip.Color(20, 0, 20, 0);
|
_bgColor=strip.Color(20, 0, 20, 0);
|
||||||
}
|
}
|
||||||
led_gauge(loopmillis,currentMean,0,16.0,strip.Color(0, 0, 0, 255),_bgColor);
|
led_gauge(loopmillis,currentMean,0,32.0,strip.Color(0, 0, 0, 255),_bgColor);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
//Disarmed
|
//Disarmed
|
||||||
|
|
Loading…
Reference in New Issue