-
Notifications
You must be signed in to change notification settings - Fork 613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CAN message schema to wpilib-ws.yaml and add 2 CANMotor props #6651
Add CAN message schema to wpilib-ws.yaml and add 2 CANMotor props #6651
Conversation
… <brakeMode to CANMotor.
const: SimDevice | ||
device: | ||
type: string | ||
format: "[^:]+" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not written in the spec that other devices cannot have colons in the name. Might I suggest (although a bit more verbose)
format: "[^:]+" | |
format: "([^:]+|(?!DutyCycle|CAN(Motor|Encoder|Gyro|Accel|AIn|DIO|DutyCycle)).*:.*)+" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest commit uses a slightly shorter and imo clearer regex.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree! Your version is clearer :D
…not covered by the specific cases.
add missing `$` in `$ref`
Co-authored-by: Peter Johnson <johnson.peter@gmail.com>
…ps (wpilibsuite#6651) Co-authored-by: CoolSpy3 <coolspythree@gmail.com>
We use
wpilib-ws.yaml
to auto-generate code designed to work with halsim_ws and are adding support for CAN devices. This PR:wpilib-ws.yaml
to reflect the specificSimDevice
type messages described in the CAN messages section (and hardware/DutyCycle section) of the api doc."<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.