Skip to content

Commit

Permalink
Add more talonfx telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
superpenguin612 committed Jan 9, 2024
1 parent 5e28662 commit b75f61d
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public class LogProfileBuilder {
* @return the array of LogItems
*/
public static AbstractLogItem<?>[] buildTalonFXLogItems(TalonFX obj) {

return new AbstractLogItem<?>[] {
new DoubleLogItem("position", () -> obj.getPosition().getValue(), LogType.NT),
new DoubleLogItem("velocity", () -> obj.getVelocity().getValue(), LogType.NT),
Expand All @@ -56,6 +57,9 @@ public static AbstractLogItem<?>[] buildTalonFXLogItems(TalonFX obj) {
new DoubleLogItem("busVoltage", () -> obj.getSupplyVoltage().getValue(), LogType.NT),
new DoubleLogItem("outputCurrent", () -> obj.getTorqueCurrent().getValue(), LogType.NT),
new StringLogItem("bridgeOutput", () -> obj.getBridgeOutput().getValue().toString(), LogType.NT),
new DoubleLogItem("closedLoopReference", () -> obj.getClosedLoopReference().getValue(), LogType.NT),
new DoubleLogItem("closedLoopOutput", () -> obj.getClosedLoopOutput().getValue(), LogType.NT),
new DoubleLogItem("closedLoopError", () -> obj.getClosedLoopError().getValue(), LogType.NT),
// new BooleanLogItem("faults/bootDuringEnable", () ->
// obj.getFault_BootDuringEnable().getValue(),
// LogType.DATALOG),
Expand Down

0 comments on commit b75f61d

Please sign in to comment.