Conversation
|
要不要把 command 和搖桿的程式都補上去,然後完整測試過可以跑再重新開 pr,不然現在只有 subsytem 和 constants 就算 merge 進去 main 也沒有什麼用。 |
| import frc.robot.Constants; | ||
|
|
||
| public class DriveSubsystem extends SubsystemBase { | ||
| XboxController joy = new XboxController(Constants.ControllerConstants.port); |
There was a problem hiding this comment.
搖桿應該要定義在 RobotContainer 裡面
然後要用 CommandXboxController
fix: method setMotorSpeed
|
有測試過了嗎? |
|
|
||
| public class RobotContainer { | ||
| CommandXboxController joy = new CommandXboxController(Constants.ControllerConstants.port); | ||
|
|
There was a problem hiding this comment.
這邊是不是少了點程式
有 Command 了,可是沒有讓 Command 執行
There was a problem hiding this comment.
可以把 DriveCmd 設成 defaultCommand
還沒 |
add: DriveSubsystem setDefaultCommand
|
|
||
| /** Creates a new DriveSubsystem. */ | ||
| public DriveSubsystem() { | ||
| setDefaultCommand(new DriveCmd(DriveSubsystem.this)); |
There was a problem hiding this comment.
這行要寫在 RobotContainer 裡面
|
這隻程式有實際跑過了嗎?要實際跑過並可以運行再開 PR 喔 |
|
|
||
| /* You should consider using the more terse Command factories API instead https://docs.wpilib.org/en/stable/docs/software/commandbased/organizing-command-based.html#defining-commands */ | ||
| public class DriveCmd extends Command { | ||
| CommandXboxController joy; |
There was a problem hiding this comment.
類別不是用 Joystick 就不要用 joy 當物件名拉,可以用 mainController controller 之類的
| import frc.robot.commands.DriveCmd; | ||
|
|
||
| public class RobotContainer { | ||
| CommandXboxController joy = new CommandXboxController(Constants.ControllerConstants.port); |
There was a problem hiding this comment.
類別不是用 Joystick 就不要用 joy 當物件名拉,可以用 mainController controller 之類的
.vscode/settings.json
Outdated
| "edu.wpi.first.math.**.struct.*", | ||
| ] | ||
| ], | ||
| "java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx2G -Xms100m -Xlog:disable" |
There was a problem hiding this comment.
呃刪掉好像也沒事,之前測的時候也沒那些東西
build.gradle
Outdated
| annotationProcessor wpi.java.deps.wpilibAnnotations() | ||
| implementation wpi.java.deps.wpilib() | ||
| implementation wpi.java.vendor.java() | ||
| implementation 'com.ctre.phoenix:api-java' |
There was a problem hiding this comment.
誒這個好像也刪了 但我還是想確認一下當初加的時候是什麼錯誤訊息啊 還是已經忘了
|
星期三遇到的 package 問題,我剛剛在我電腦把 DriveSubsystem 加回 frc.robot.subsystems ,是可以編譯的欸,要不要再試試看 |
這個現在在你電腦上跑是好的嗎 |
是的話才改喔 不然就維持原狀 找到問題之後再改 |
可以編譯 |
No description provided.