master
phail 3 years ago
parent 781269358d
commit 4f53fc3d7b
  1. 2
      include/Paddelec.h
  2. 6
      src/Paddelec.cpp

@ -39,7 +39,7 @@ class Paddelec
cfgPaddle.pwmMultiplier = 0.02; // effect of paddle stroke to speed
cfgPaddle.crosstalkLR = 0.0; // multiplier for steering
cfgPaddle.realign = 0.0; // paddelc tries to go straight forward
cfgPaddle.drag = 0.0003; // drag/water resistance
cfgPaddle.drag = 0.0002; // drag/water resistance
cfgPaddle.flipControl = 1; // 1: Normal. -1 Flipped
cfgPaddle.maxValidSpeed = 15.0; // All speed inputs above this threshold are considered unplausible and therefore faulty
cfgPaddle.maxValidSteer = 15.0; // All steer inputs above this threshold are considered unplausible and therefore faulty

@ -39,7 +39,7 @@ void Paddelec::update(volatile double &pwm, volatile double &steer, volatile d
/* convert from speed and steering to left and right wheel speed */
steerToRL(steer, pwm, pwmL, pwmR);
steerToRL(actualSteer_kmh, actualSpeed_kmh, speedL_kmh, speedR_kmh);
steerToRL(actualSteer_kmh, actualSpeed_kmh, speedR_kmh, speedL_kmh);
/* Remove Offset added to overcome intial inertia */
@ -102,8 +102,8 @@ void Paddelec::update(volatile double &pwm, volatile double &steer, volatile d
if(imu.az > 80)
#endif
{
slowReset(steer, 0, 300, 0);
slowReset(pwm, 0, 300, 0);
slowReset(steer, 0, 100, 0);
slowReset(pwm, 0, 100, 0);
return;
}

Loading…
Cancel
Save