change to current mode

This commit is contained in:
interfisch 2019-12-29 01:09:24 +01:00
parent 1affd1220d
commit 3dd5549f82
2 changed files with 4 additions and 3 deletions

View File

@ -452,11 +452,12 @@ void loop_idle() {
void loop_on() {
int16_t speedvalue=constrain( map(adc_throttle, ADC_CALIB_THROTTLE_MIN, ADC_CALIB_THROTTLE_MAX, 0, 1000 ) ,0, 1000);
int16_t lastSpeed=(out_speedFL+out_speedFR+out_speedRL+out_speedRR)/4;
/*int16_t lastSpeed=(out_speedFL+out_speedFR+out_speedRL+out_speedRR)/4;
if (speedvalue<=lastSpeed) { //braking
speedvalue = (lastSpeed-speedvalue)>MAXBRAKERATE ? (lastSpeed-MAXBRAKERATE):speedvalue;
}
}*/
out_speedFL=speedvalue;
out_speedFR=speedvalue;

@ -1 +1 @@
Subproject commit 7c76c9f8392b9344033f6a7c06d4ceb000b024da
Subproject commit b1e6d9e995273a3c0e4baca66a10b09b8e64843d