![]() |
RSeries astromech firmware
|
#include <drive/DomeDriveSabertooth.h>
Inheritance diagram for DomeDriveSabertooth:
Collaboration diagram for DomeDriveSabertooth:Public Member Functions | |
| DomeDriveSabertooth (int id, Stream &serial, JoystickController &domeStick) | |
| Constructor. More... | |
| void | setBaudRate (unsigned baudRate) |
| void | setAddress (uint8_t addr) |
| 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 DomeDrive | |
| DomeDrive (JoystickController &domeStick) | |
| Constructor. More... | |
| void | setDomePosition (DomePosition *domePosition) |
| bool | checkError () |
| bool | getEnable () const |
| void | setEnable (bool enable) |
| uint32_t | getSerialLatency () const |
| void | setSerialLatency (uint32_t ms) |
| bool | getInverted () const |
| void | setInverted (bool invert) |
| bool | getScaling () const |
| void | setScaling (bool scaling) |
| float | getMaxSpeed () const |
| void | setMaxSpeed (float modifier) |
| unsigned | getThrottleAccelerationScale () const |
| void | setThrottleAccelerationScale (unsigned scale) |
| unsigned | getThrottleDecelerationScale () const |
| void | setThrottleDecelerationScale (unsigned scale) |
| void | setDomeStick (JoystickController &domeStick) |
| bool | useThrottle () |
| bool | useHardStop () |
| bool | useLeftStick () |
| bool | useRightStick () |
| void | setUseThrottle (bool use) |
| void | setUseHardStop (bool use) |
| void | setUseLeftStick () |
| void | setUseRightStick () |
| bool | isMoving () |
| JoystickController * | getActiveStick () |
| virtual void | animate () override |
| Subclasses must implement this function to run through a single frame of animation/activity. More... | |
| virtual void | driveDome (float m) |
| virtual void | autonomousDriveDome (float m) |
| virtual bool | idle () |
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 m) override |
Protected Member Functions inherited from DomeDrive | |
| virtual float | getThrottle () |
| virtual float | throttleSpeed (float speedModifier) |
| int | normalize (int degrees) |
| int | shortestDistance (int origin, int target) |
| float | getSpeed (float percentage) |
| bool | moveDomeToTarget (int pos, int target, int fudge, float speed, float &m) |
| void | domeStick (JoystickController *stick, float speedModifier) |
Protected Member Functions inherited from SabertoothDriver | |
| SabertoothDriver (byte address, Stream &port) | |
| byte | address () const |
| void | setAddress (byte addr) |
| void | autobaud (boolean dontWait=false) const |
| void | command (byte command, byte value) const |
| void | motor (int power) const |
| void | motor (byte motor, int power) const |
| void | drive (int power) const |
| void | turn (int power) const |
| void | stop () const |
| void | setMinVoltage (byte value) const |
| void | setMaxVoltage (byte value) const |
| void | setBaudRate (long baudRate) const |
| void | setDeadband (byte value) const |
| void | setRamping (byte value) const |
| void | setTimeout (int milliseconds) const |
Protected Attributes | |
| uint16_t | fBaudRate |
Protected Attributes inherited from DomeDrive | |
| JoystickController & | fDomeStick |
| bool | fError = false |
| bool | fEnabled = false |
| bool | fWasConnected = false |
| bool | fMotorStopped = false |
| bool | fIdle = true |
| bool | fScaling = false |
| bool | fUseLeftStick = false |
| bool | fUseThrottle = true |
| bool | fUseHardStop = false |
| bool | fInverted = false |
| bool | fMoving = false |
| float | fSpeedModifier |
| float | fDrive = 0 |
| float | fAutoDrive = 0 |
| int | fLastDomePosition = -1 |
| uint32_t | fSerialLatency = 0 |
| uint32_t | fLastCommand = 0 |
| uint32_t | fLastDomeMovement = 0 |
| bool | fDomeMovementStarted = false |
| unsigned | fThrottleAccelerationScale = 0 |
| unsigned | fThrottleDecelerationScale = 0 |
| float | fDomeThrottle = 0 |
| int | fLastDomeMode = -1 |
| int | fAutoDomeTargetPos = 0 |
| bool | fAutoDomeGoHome = false |
| bool | fAutoDomeLeft = random(1) |
| uint32_t | fNextAutoDomeMovement = 0 |
| DomePosition * | fDomePosition = nullptr |
| uint32_t | fMovementStartTime = 0 |
| uint32_t | fMovementFinishTime = 0 |
| void(* | fComplete )() = nullptr |
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... | |
Protected Types inherited from DomeDrive | |
| enum | DomeMode { kOff, kHome, kRandom } |
Static Protected Member Functions inherited from DomeDrive | |
| static bool | withinArc (double p1, double p2, double p3) |
Static Protected Member Functions inherited from SabertoothDriver | |
| static void | autobaud (Stream &port, boolean dontWait=false) |
|
inline |
Constructor.
Only a single instance of WifiSerialBridge should be created per sketch.
| port | the port number of this service |
|
inlineoverrideprotectedvirtual |
Implements DomeDrive.
|
inline |
|
inline |
|
inlineoverridevirtual |
Subclasses must implement this function to perform any necessary setup that cannot happen in the constructor.
Reimplemented from DomeDrive.
|
inlineoverridevirtual |
Reimplemented from DomeDrive.
|
protected |