mirror of
https://github.com/BroncBotz3481/YAGSL
synced 2026-06-26 07:01:39 +00:00
Addressing issue #7 by reading CANCoder values until successful with 10ms delay between readings. Fall back to reading relative encoder.
This commit is contained in:
@@ -31,8 +31,11 @@ class TalonFXSimProfile extends SimProfile
|
||||
* @param fullVel The maximum motor velocity, in ticks per 100ms
|
||||
* @param sensorPhase The phase of the TalonFX sensors
|
||||
*/
|
||||
public TalonFXSimProfile(final TalonFX falcon, final double accelToFullTime, final double fullVel,
|
||||
final boolean sensorPhase)
|
||||
public TalonFXSimProfile(
|
||||
final TalonFX falcon,
|
||||
final double accelToFullTime,
|
||||
final double fullVel,
|
||||
final boolean sensorPhase)
|
||||
{
|
||||
this._falcon = falcon;
|
||||
this._accelToFullTime = accelToFullTime;
|
||||
@@ -42,9 +45,10 @@ class TalonFXSimProfile extends SimProfile
|
||||
|
||||
/**
|
||||
* Runs the simulation profile.
|
||||
* <p>
|
||||
* This uses very rudimentary physics simulation and exists to allow users to test features of our products in
|
||||
* simulation using our examples out of the box. Users may modify this to utilize more accurate physics simulation.
|
||||
*
|
||||
* <p>This uses very rudimentary physics simulation and exists to allow users to test features of
|
||||
* our products in simulation using our examples out of the box. Users may modify this to utilize more accurate
|
||||
* physics simulation.
|
||||
*/
|
||||
public void run()
|
||||
{
|
||||
@@ -85,4 +89,4 @@ class TalonFXSimProfile extends SimProfile
|
||||
|
||||
_falcon.getSimCollection().setBusVoltage(12 - outPerc * outPerc * 3 / 4 * random(0.95, 1.05));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user