[commands] Add setRumble and isConnected to CommandGenericHID (#6768)

This commit is contained in:
Jade
2024-07-06 08:47:31 +08:00
committed by GitHub
parent b4645a30f6
commit f0f4bac680
3 changed files with 46 additions and 0 deletions

View File

@@ -230,6 +230,23 @@ class CommandGenericHID {
frc::EventLoop* loop =
CommandScheduler::GetInstance().GetDefaultButtonLoop()) const;
/**
* Set the rumble output for the HID.
*
* The DS currently supports 2 rumble values, left rumble and right rumble.
*
* @param type Which rumble value to set
* @param value The normalized value (0 to 1) to set the rumble to
*/
void SetRumble(frc::GenericHID::RumbleType type, double value);
/**
* Get if the HID is connected.
*
* @return true if the HID is connected
*/
bool IsConnected() const;
private:
frc::GenericHID m_hid;
};