File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
core/src/main/java/org/strykeforce/thirdcoast/telemetry Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,11 @@ public enum Measure {
2222 SPEED ("Speed" ),
2323 FEEDBACK ("Feedback" ),
2424 VALUE ("Value" ),
25- ANALOG_RAW ("Analog Raw" );
25+ ANALOG_RAW ("Analog Raw" ),
26+ MOMAGIC_ACCL ("Motion Magic Acceleration" ),
27+ MOMAGIC_A_TRAJ_POS ("Motion Magic Trajectory Point Target Position" ),
28+ MOMAGIC_A_TRAJ_VEL ("Motion Magic Trajectory Point Target Velocity" ),
29+ MOMAGIC_CRUISE_VEL ("Motion Magic Cruise Velocity" );
2630
2731// private final static Map<Item.Type, Set<Measure>> byType = new HashMap<>();
2832//
Original file line number Diff line number Diff line change @@ -33,7 +33,11 @@ public class TalonItem extends AbstractItem {
3333 Measure .REVERSE_SOFT_LIMIT_OK ,
3434 Measure .POSITION ,
3535 Measure .SPEED ,
36- Measure .FEEDBACK
36+ Measure .FEEDBACK ,
37+ Measure .MOMAGIC_ACCL ,
38+ Measure .MOMAGIC_A_TRAJ_POS ,
39+ Measure .MOMAGIC_A_TRAJ_VEL ,
40+ Measure .MOMAGIC_CRUISE_VEL
3741 ));
3842 // TODO: getMotionProfileStatus
3943 private final static String NA = "not available in API" ;
@@ -100,6 +104,14 @@ public DoubleSupplier measurementFor(final Measure measure) {
100104 return talon ::getPosition ;
101105 case ANALOG_RAW :
102106 return talon ::getAnalogInRaw ;
107+ case MOMAGIC_ACCL :
108+ return talon ::getMotionMagicAcceleration ;
109+ case MOMAGIC_A_TRAJ_POS :
110+ return talon ::getMotionMagicActTrajPosition ;
111+ case MOMAGIC_A_TRAJ_VEL :
112+ return talon ::getMotionMagicActTrajVelocity ;
113+ case MOMAGIC_CRUISE_VEL :
114+ return talon ::getMotionMagicCruiseVelocity ;
103115 default :
104116 throw new AssertionError (measure );
105117 }
You can’t perform that action at this time.
0 commit comments