-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Using the latest branch from the 2019 - 2020 repository begin the migration of our useful code.
This process will begin with our most reliable functions: Color Sensor
Begin by going to the autoBaseV5A class. This class had most of our autonomous functions.
Here is a list of functions to migrate:
- bottomTapeSensorDetectedRedReborn1 (line 41)
- bottomTapeSensorDetectedBlueReborn1 (line 378)
- SkyStoneReBornRight (line 212)
- calibrate (line 414)
Note:
The following code is used to calibrate the color sensor. Make note of the variables referenced and make sure to declare them at the top of the class so as to ensure a clean transition.
public void calibrate(ColorSensor cs) {
int baseG = cs.green();
int baseB = cs.blue();
int baseR = cs.red();
totalG = totalG + baseG;
totalB = totalB + baseB;
totalR = totalR + baseR;
avgG = (totalG / iteration);
avgB = (totalB / iteration);
avgR = (totalR / iteration);
iteration++;
}
Before making these changes make sure that you are in your own branch within the migration branch!
Metadata
Metadata
Assignees
Labels
No labels