wpilibsuite / allwpilib

Official Repository of WPILibJ and WPILibC
https://wpilib.org/
Other
1.04k stars 606 forks source link

Add CAN message schema to wpilib-ws.yaml and add 2 CANMotor props #6651

Closed brettle closed 1 month ago

brettle commented 1 month ago

We use wpilib-ws.yaml to auto-generate code designed to work with halsim_ws and are adding support for CAN devices. This PR:

  1. Updates wpilib-ws.yaml to reflect the specific SimDevice type messages described in the CAN messages section (and hardware/DutyCycle section) of the api doc.
  2. Adds and documents "<neutralDeadband" and "<brakeMode" as 2 new data properties for CANMotor messages. These are needed so that a simulated CANMotor can respond appropriately (including setting ">motorCurrent" and/or ">supplyCurrent") when "<percentOutput" is set.