working freewheeling, no brake
This commit is contained in:
parent
3dd5549f82
commit
4b522c73e8
|
@ -451,7 +451,11 @@ void loop_idle() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop_on() {
|
void loop_on() {
|
||||||
int16_t speedvalue=constrain( map(adc_throttle, ADC_CALIB_THROTTLE_MIN, ADC_CALIB_THROTTLE_MAX, 0, 1000 ) ,0, 1000);
|
int _maxspeed=1000;
|
||||||
|
if (MODESWITCH_DOWN) {
|
||||||
|
_maxspeed=200;
|
||||||
|
}
|
||||||
|
int16_t speedvalue=constrain( map(adc_throttle, ADC_CALIB_THROTTLE_MIN, ADC_CALIB_THROTTLE_MAX, 0, _maxspeed ) ,0, _maxspeed);
|
||||||
/*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
|
if (speedvalue<=lastSpeed) { //braking
|
||||||
|
|
Loading…
Reference in New Issue