recalibrate throttle lever

This commit is contained in:
interfisch 2024-07-22 10:50:00 +02:00
parent 4ef6e7448b
commit a575fb009d
2 changed files with 16 additions and 4 deletions

View File

@ -29,17 +29,28 @@ bool controllers_connected=false;
//const uint16_t calib_throttle_min = 420; //better a bit too high than too low
//const uint16_t calib_throttle_max = 790;
/*
const uint16_t failsafe_throttle_min_A = 4900; //if adc value falls below this failsafe is triggered.
const uint16_t failsafe_throttle_max_A = 14500; //if adc value goes above this failsafe is triggered.
const uint16_t failsafe_throttle_min_B = 3900; //if adc value falls below this failsafe is triggered.
const uint16_t failsafe_throttle_max_B = 12500; //if adc value goes above this failsafe is triggered.
*/
const uint16_t failsafe_throttle_min_A = 3000; //if adc value falls below this failsafe is triggered.
const uint16_t failsafe_throttle_max_A = 13000; //if adc value goes above this failsafe is triggered.
const uint16_t failsafe_throttle_min_B = 5000; //if adc value falls below this failsafe is triggered.
const uint16_t failsafe_throttle_max_B = 14500; //if adc value goes above this failsafe is triggered.
const uint16_t failsafe_throttle_maxDiff = 200;//maximum adc value difference between both sensors A and B. value range 0-1000. choose value at least 2x higher than maximum difference when moving throttle slowly
//const uint16_t throttleCurvePerMM[] = {414,460,490,511,527,539,548,555,561,567,573,578,584,590,599,611,630,657,697,754,789,795}; //adc values for every unit (mm) of linear travel
//const uint16_t throttleCurvePerMM[] = {8485,8904,9177,9368,9513,9623,9705,9768,9823,9877,9932,9978,10032,10087,10169,10278,10451,10697,11061,11579,11898,11952}; //adc values for every unit (mm) of linear travel. config used until 20230826
//const uint16_t throttleCurvePer4MM[] = {8485,8904,9177,9368,9513,9623,9705,9768,9823,9877,9932,9978,10032,10087,10169,10278,10451,10697,11061,11579,11898,11952}; //adc values for every unit (mm) of linear travel. config used until 20230826
//const uint16_t throttleCurvePerMM_A[] = {11800,11130,10300,9990,9650,9470,9370,9240,9130,9030,8950,8850,8700,8560,8350,8040,7750,7150,6520}; //adc values for every unit (mm) of linear travel
const uint16_t throttleCurvePerMM_A[] = {11800,11130,10300,9990,9650,9470,9370,9240,9130,9030,8950,8850,8700,8560,8350,8040,7750,7150,6520}; //adc values for every unit (mm) of linear travel
const bool throttleCurvePerMM_A_Descending=true; //set true if corresponding array is descending
const uint16_t throttleCurvePerMM_B[] = {6200,6700,7420,7710,8030,8200,8310,8440,8560,8640,8740,8840,8990,9130,9330,9630,9900,10440,10990}; //adc values for every unit (mm) of linear travel
//const uint16_t throttleCurvePerMM_B[] = {6200,6700,7420,7710,8030,8200,8310,8440,8560,8640,8740,8840,8990,9130,9330,9630,9900,10440,10990}; //adc values for every unit (mm) of linear travel
const uint16_t throttleCurvePerMM_A[] = {11260,10460,9960,9610,9590,9400,9250,9160,9070,8970,8860,8750,8610,8435,8230,7960,7520, 7000, 6340, 5230,4860}; //adc values for every unit (mm) of linear travel
const uint16_t throttleCurvePerMM_B[] = {6710, 7330, 7750,8060,8070,8250,8380,8490,8580,8670,8780,8870,9000,9160,9350,9610,10020,10500,11120,12160,13080}; //adc values for every unit (mm) of linear travel
const bool throttleCurvePerMM_B_Descending=false; //set true if corresponding array is descending
const uint16_t calib_brake_min = 7000; //better a bit too high than too low

View File

@ -341,12 +341,13 @@ void display_standingDisarmedDisplay(ESCSerialComm& escFront, ESCSerialComm& esc
dtostrf(ads_brake_raw,1,0,buf);
display.print((String)buf);
display.setCursor(6*10,0);
display.setCursor(8*10,2*8);
dtostrf((escFront.getFeedback_batVoltage()+escRear.getFeedback_batVoltage())/2.0,1,1,buf);
display.print((String)buf);
display.print(F("V"));
display.println();
//TODO: show deviation (and max deviation), show resulting throttle and brake pos
/*display.print(" c=");