-
Notifications
You must be signed in to change notification settings - Fork 616
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
[hal] Change usage reporting to string-based #7763
base: 2027
Are you sure you want to change the base?
Conversation
This PR modifies commands. Please open a corresponding PR in Python Commands and include a link to this PR. |
Fixes #301 |
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.
Why is there a mix of adding one to the port and not adding one to the port? (Notably, AnalogAccerelometer and DigitalInput have different behavior depending on the language)
Files that started adding one: None
Files that still add one: hid.lang.jinja
, pwm_motor_controller.lang.jinja
, AnalogAccelerometer.cpp
, DigitalInput.cpp
Files that never added one: ADXL345_I2C.java
(didn't report port before), I2C.lang
(used to report just device address, now also reports port), PowerDistribution.lang
(didn't port module before), UpDownCounter.java
Files that no longer add one: AddressableLED.lang
, AnalogAccelerometer.java
, AnalogGyro.java
, CAN.lang
, Compressor.lang
, DigitalInput.java
, DigitalOutput.lang
, DoubleSolenoid.lang
, DutyCycle.lang
, Encoder.lang
(part of changing from using FPGA index to using a and b channels), Joystick.lang
, PWM.lang
, SerialPort.lang
, Servo.lang
, Solenoid.lang
, Tachometer.lang
, UpDownCounter.cpp
, NidecBrushless.lang
connInfo->remote_id.starts_with("elastic") || | ||
connInfo->remote_id.starts_with("Elastic") || |
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.
Minor- Do we care about Elastic having two different names it might be reported as? (Since right now the remote id is directly reported)
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.
That was to cover people using 2024 Elastic, I think it's safe to get rid of the special case for 2027.
@@ -45,7 +44,7 @@ public NidecBrushless(final int pwmChannel, final int dioChannel) { | |||
m_pwm = new PWM(pwmChannel); | |||
SendableRegistry.addChild(this, m_pwm); | |||
|
|||
HAL.report(tResourceType.kResourceType_NidecBrushless, pwmChannel + 1); | |||
HAL.reportUsage("NidecBrushless", pwmChannel, ""); |
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.
Why doesn't this report dioChannel like C++ does?
TODO:
Solenoid[ID][Num]
with a value ofPCM
orPCM[ID]/Solenoid[Num]
with an empty value? The latter avoids the potential conflict of having both a PCM and a PH on the same ID.Fixes #301.