Skip to content

Commit

Permalink
resolve intake merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewChoulas committed Jan 28, 2024
2 parents efcfaed + 2126903 commit ae2d7bc
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 117 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ $RECYCLE.BIN/
### Gradle ###
.gradle
/build/
BuildConstants.kt

# Ignore Gradle GUI config
gradle-app.setting
Expand Down Expand Up @@ -168,5 +169,8 @@ out/
# Fleet
.fleet


# Simulation GUI and other tools window save file
*-window.json

src/main/kotlin/com/team4099/robot2023/BuildConstants.kt
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ dependencies {
simulationRelease wpi.sim.enableRelease()

implementation 'org.jetbrains.kotlin:kotlin-test-junit5'
implementation 'com.github.team4099:FalconUtils:1.1.26'
implementation 'com.github.team4099:FalconUtils:1.1.28'
implementation 'org.apache.commons:commons-collections4:4.0'
implementation 'com.google.code.gson:gson:2.10.1'
implementation "io.javalin:javalin:5.3.2"
Expand Down
2 changes: 2 additions & 0 deletions src/main/kotlin/com/team4099/lib/phoenix6/PositionVoltage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import org.team4099.lib.units.perSecond
import com.ctre.phoenix6.controls.PositionVoltage as PositionVoltagePhoenix6

class PositionVoltage(

private var position: Angle, // Assuming an AngularPosition type exists similar to AngularVelocity
private var enableFOC: Boolean = true,
private var feedforward: ElectricalPotential = 0.0.volts,
Expand All @@ -20,6 +21,7 @@ class PositionVoltage(
private var limitForwardMotion: Boolean = false,
private var limitReverseMotion: Boolean = false,
private var velocity: AngularVelocity = 0.0.degrees.perSecond,

) {

val positionVoltagePhoenix6 = PositionVoltagePhoenix6(position.inRotations, velocity.inRotationsPerSecond, enableFOC, feedforward.inVolts, slot, overrideBrakeDurNeutral, limitForwardMotion, limitReverseMotion)
Expand Down
15 changes: 0 additions & 15 deletions src/main/kotlin/com/team4099/robot2023/BuildConstants.kt

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,51 +17,6 @@ import org.team4099.lib.units.perSecond

sealed interface Request {

sealed interface SuperstructureRequest : Request {
class Idle() : SuperstructureRequest
class Home() : SuperstructureRequest

class GroundIntakeCube() : SuperstructureRequest
class GroundIntakeCone() : SuperstructureRequest

class EjectGamePiece() : SuperstructureRequest

class DoubleSubstationIntakePrep(val gamePiece: GamePiece) : SuperstructureRequest
class SingleSubstationIntakePrep(val gamePiece: GamePiece) : SuperstructureRequest

class DoubleSubstationIntake() : SuperstructureRequest
class SingleSubstationIntake(val gamePiece: GamePiece) : SuperstructureRequest

class PrepScore(val gamePiece: GamePiece, val nodeTier: NodeTier) : SuperstructureRequest

class Score() : SuperstructureRequest

class Tuning() : SuperstructureRequest
}

// Implements RequestStructure to ensure standardized structure
sealed interface ManipulatorRequest : Request {
class TargetingPosition(val position: Length, val rollerVoltage: ElectricalPotential) :
ManipulatorRequest
class OpenLoop(val voltage: ElectricalPotential, val rollerVoltage: ElectricalPotential) :
ManipulatorRequest
class Home() : ManipulatorRequest
}

sealed interface ElevatorRequest : Request {
class TargetingPosition(
val position: Length,
val finalVelocity: LinearVelocity = 0.0.inches.perSecond,
val canContinueBuffer: Length = 5.0.inches
) : ElevatorRequest
class OpenLoop(val voltage: ElectricalPotential) : ElevatorRequest
class Home : ElevatorRequest
}

sealed interface IntakeRequest : Request {
class OpenLoop(val rollerVoltage: ElectricalPotential) : IntakeRequest
}

sealed interface DrivetrainRequest : Request {
class OpenLoop(
val angularVelocity: AngularVelocity,
Expand All @@ -76,4 +31,8 @@ sealed interface Request {
class ZeroSensors : DrivetrainRequest
class Idle : DrivetrainRequest
}

sealed interface IntakeRequest : Request {
class OpenLoop(val rollerVoltage: ElectricalPotential) : IntakeRequest
}
}
6 changes: 3 additions & 3 deletions vendordeps/PathplannerLib.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"fileName": "PathplannerLib.json",
"name": "PathplannerLib",
"version": "2024.0.0-beta-6",
"version": "2024.1.3",
"uuid": "1b42324f-17c6-4875-8e77-1c312bc8c786",
"frcYear": "2024",
"mavenUrls": [
Expand All @@ -12,15 +12,15 @@
{
"groupId": "com.pathplanner.lib",
"artifactId": "PathplannerLib-java",
"version": "2024.0.0-beta-6"
"version": "2024.1.3"
}
],
"jniDependencies": [],
"cppDependencies": [
{
"groupId": "com.pathplanner.lib",
"artifactId": "PathplannerLib-cpp",
"version": "2024.0.0-beta-6",
"version": "2024.1.3",
"libName": "PathplannerLib",
"headerClassifier": "headers",
"sharedLibrary": false,
Expand Down

0 comments on commit ae2d7bc

Please sign in to comment.