![]() |
RSeries astromech firmware
|
#include <drive/TankDriveSerial.h>
Base template of automatic forwarder from i2c to CommandEvent.
Inheritance diagram for TankDriveSerial:
Collaboration diagram for TankDriveSerial:Public Member Functions | |
| TankDriveSerial (Stream &stream, JoystickController &driveStick) | |
| Constructor. More... | |
| virtual void | setup () override |
| Subclasses must implement this function to perform any necessary setup that cannot happen in the constructor. More... | |
| virtual void | stop () override |
Public Member Functions inherited from TankDrive | |
| TankDrive (JoystickController &driveStick) | |
| Constructor. More... | |
| bool | getEnable () |
| void | setEnable (bool enable) |
| uint32_t | getSerialLatency () |
| void | setSerialLatency (uint32_t ms) |
| bool | getChannelMixing () |
| void | setChannelMixing (bool mixing) |
| bool | getThrottleInverted () |
| void | setThrottleInverted (bool invert) |
| bool | getTurnInverted () |
| void | setTurnInverted (bool invert) |
| bool | getScaling () |
| void | setScaling (bool scaling) |
| float | getMaxSpeed () |
| void | setMaxSpeed (float modifier) |
| unsigned | getThrottleAccelerationScale () |
| void | setThrottleAccelerationScale (unsigned scale) |
| unsigned | getThrottleDecelerationScale () |
| void | setThrottleDecelerationScale (unsigned scale) |
| unsigned | getTurnAccelerationScale () |
| void | setTurnAccelerationScale (unsigned scale) |
| unsigned | getTurnDecelerationScale () |
| void | setTurnDecelerationScale (unsigned scale) |
| void | setAccelerationScale (unsigned scale) |
| void | setDecelerationScale (unsigned scale) |
| void | setDriveStick (JoystickController &driveStick) |
| void | setGuestStick (JoystickController &guestStick) |
| float | getGuestSpeedModifier () |
| void | setGuestSpeedModifier (float maxGuestSpeed) |
| void | setTargetSteering (TargetSteering *target) |
| bool | useThrottle () |
| bool | useHardStop () |
| bool | useLeftStick () |
| bool | useRightStick () |
| void | setUseThrottle (bool use) |
| void | setUseHardStop (bool use) |
| void | setUseLeftStick () |
| void | setUseRightStick () |
| JoystickController * | getActiveStick () |
| virtual void | animate () override |
| Dispatch any received i2c event to CommandEvent. More... | |
Public Member Functions inherited from SetupEvent | |
| SetupEvent () | |
| Default Constructor. More... | |
Public Member Functions inherited from AnimatedEvent | |
| AnimatedEvent () | |
| Default Constructor. More... | |
| void | setLoopDoneCallback (AnimatedLoopDone loopProc) |
Protected Member Functions | |
| virtual void | motor (float left, float right, float throttle) override |
| void | printNumZeroPad (unsigned num) |
Protected Member Functions inherited from TankDrive | |
| virtual float | getThrottle () |
| virtual bool | hasThrottle () |
| virtual float | throttleSpeed (float speedModifier) |
| void | driveStick (JoystickController *stick, float speedModifier) |
Protected Attributes | |
| Stream * | fSerial |
| bool | fStopped |
Protected Attributes inherited from TankDrive | |
| JoystickController & | fDriveStick |
| JoystickController * | fGuestStick |
| TargetSteering * | fTargetSteering |
| bool | fEnabled = false |
| bool | fWasConnected = false |
| bool | fMotorsStopped = false |
| bool | fChannelMixing = false |
| bool | fScaling = false |
| bool | fUseLeftStick = true |
| bool | fUseThrottle = true |
| bool | fUseHardStop = true |
| bool | fThrottleInverted = false |
| bool | fTurnInverted = false |
| float | fSpeedModifier = 0 |
| float | fGuestSpeedModifier = 0 |
| uint32_t | fSerialLatency = 0 |
| uint32_t | fLastCommand = 0 |
| unsigned | fThrottleAccelerationScale = 0 |
| unsigned | fThrottleDecelerationScale = 0 |
| unsigned | fTurnAccelerationScale = 0 |
| unsigned | fTurnDecelerationScale = 0 |
| float | fDriveThrottle = 0 |
| float | fDriveTurning = 0 |
Additional Inherited Members | |
Static Public Member Functions inherited from SetupEvent | |
| static void | ready () |
| Calls setup() for each created AnimatedEvent subclass. More... | |
Static Public Member Functions inherited from AnimatedEvent | |
| static void | process () |
| Calls animate() for each created AnimatedEvent subclass. More... | |
|
inline |
Constructor.
Will drive PWM pins
|
inlineoverrideprotectedvirtual |
Implements TankDrive.
|
inlineprotected |
|
inlineoverridevirtual |
Subclasses must implement this function to perform any necessary setup that cannot happen in the constructor.
Reimplemented from TankDrive.
|
inlineoverridevirtual |
Reimplemented from TankDrive.
|
protected |
|
protected |