|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#6
|
||||
|
||||
|
Re: New to FRC programming... How does this look?
Like omalleyj said, resetting gyro in the loop isn't a good way, especially when it's moving.
I would do something simple like this: Code:
// Reset gyro before the main loop, or with a button.
double angle = gyro.getAngle();
if (angle < 90) {
drivetrain.drive(0.0, 0.15); // I don't know how turn works, I've only done tank drive and mecanum drive in the past.
}
|
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|