mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-02 02:51:42 +00:00
Add a way to indicate a Sendable is an actuator (#1226)
SendableBuilder.setActuator() sets the .actuator key in the network table so dashboards can change behavior on the client side if desired, and also sets a local flag (retrievable via isActuator()). Both make drive bases actuators and call setSafeState on them.
This commit is contained in:
@@ -32,6 +32,14 @@ class SendableBuilder {
|
||||
*/
|
||||
virtual void SetSmartDashboardType(const wpi::Twine& type) = 0;
|
||||
|
||||
/**
|
||||
* Set a flag indicating if this sendable should be treated as an actuator.
|
||||
* By default this flag is false.
|
||||
*
|
||||
* @param value true if actuator, false if not
|
||||
*/
|
||||
virtual void SetActuator(bool value) = 0;
|
||||
|
||||
/**
|
||||
* Set the function that should be called to set the Sendable into a safe
|
||||
* state. This is called when entering and exiting Live Window mode.
|
||||
|
||||
Reference in New Issue
Block a user