DeepBlueRobotics / lib199

Code that we reuse in different projects/years.
Other
2 stars 0 forks source link

Use names for sim CAN devices and data that conform to spec #93

Closed brettle closed 4 months ago

brettle commented 4 months ago

Based on my reading of the spec, we should make the following changes:

  1. SparkMax[id] -> CANMotor:CANSparkMax[id] with Speed -> percentOutput and Current Draw -> motorCurrent
  2. SparkFlex[id] -> CANMotor:CANSparkMax[id] with Speed -> percentOutput and Current Draw -> motorCurrent
  3. Spark[id]_RelativeEncoder -> CANEncoder:CANSpark[id] with Position -> position (w/ units changed to rotations) and Velocity -> velocity (w/ units changed to rps)
  4. Spark[id]_AbsoluteEncoder -> CANDutyCycle:CANSpark[id] with Position -> position (w/ units changed to rotations)
  5. CANCoder[i] -> CANDutyCycle:CANCoder[id] with count -> position (w/ units changed to rotations)
  6. (maybe?) PlayingWithFusionTimeOfFlight[i] -> CANAIn:PlayingWithFusionTimeOfFlight[i]-rangeVoltsIsMM with range->voltage and CANAIn:PlayingWithFusionTimeOfFlight[i]-ambientLightLevelVoltsIsMcps with ambientLightLevel->voltage.
  7. Change other data names to camel case for consistency (e.g. "Neutral Deadband" -> neutralDeadband).

Thoughts @CoolSpy3?

I would especially like to get the units changed so that simulation code don't need to jump through hoops to undo the various calculations that lib199 then redoes.

brettle commented 4 months ago

@CoolSpy3, fyi, I'm taking a show at this.