Skip to content
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

Phoenix6 #49

Open
wants to merge 5 commits into
base: offseason-tuning
Choose a base branch
from
Open

Phoenix6 #49

wants to merge 5 commits into from

Conversation

MatthewChoulas
Copy link
Contributor

No description provided.

@@ -35,26 +33,6 @@ class LedConstants {
MOVEMENT(Blinkin.BlinkinLedMode.FIXED_STROBE_WHITE)
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I deleted this cause according to phoenix6 migration guide candle support hasn't been added yet


private val isConnected = pigeon2.lastError.equals(ErrorCode.OK)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't find an equivalent to this in pigeon2 code, im not sure if the .upTime attribute is the write way to check if the pigeon is connected

DrivetrainConstants.DRIVE_STATOR_CURRENT_LIMIT.inAmperes
driveConfiguration.statorCurrLimit.triggerThresholdCurrent =
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i didn't see any time or trigger thresholds for stator current? is this stator current limit stuff important since it isn't enabled


inputs.drivePosition = driveSensor.position
inputs.steeringPosition = steeringSensor.position

inputs.driveVelocity = driveSensor.velocity
inputs.steeringVelocity = steeringSensor.velocity

inputs.driveTemp = driveFalcon.temperature.celsius
inputs.steeringTemp = steeringFalcon.temperature.celsius
// processor temp is also something we may want to log ?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

phoenix6 has temp for both device and processor, do we only care about device?

}
steeringFalcon.configurator.apply(motorOutputConfig)
// motor output configs might overwrite invert?
steeringFalcon.inverted = true
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

motorOutputConfig also controls the invert so I added this incase it gets overrided from the previous line, even if it doesn't this couldn't hurt right?

@@ -178,19 +178,19 @@ class Falcon500(
) : Motor<Falcon>() {

override val appliedVoltage: ElectricalPotential
get() = falcon500.motorOutputVoltage.volts
get() = (falcon500.get() * RobotController.getBatteryVoltage()).volts
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was gonna use supply voltage for this but in phoenix6 code they use battery voltage to scale percent output into volts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant