fix speed calculation. should fix low voltage poweroff while driving
This commit is contained in:
parent
b1e6d9e995
commit
5f063a0bb6
|
@ -408,7 +408,7 @@ int main(void) {
|
|||
speedL = speedLeftFixdt >> 4; // convert fixed-point to integer
|
||||
speedR = speedRightFixdt >> 4; // convert fixed-point to integer
|
||||
|
||||
speed = (speedL+speedR)/2;
|
||||
speed = (abs(speedL)+abs(speedR))/2;
|
||||
|
||||
// ####### MIXER #######
|
||||
// speedR = CLAMP((int)(speed * SPEED_COEFFICIENT - steer * STEER_COEFFICIENT), -1000, 1000);
|
||||
|
|
Loading…
Reference in New Issue