Modifier and Type | Field and Description |
---|---|
(package private) static int |
allignDegree |
(package private) static int |
centerDegree |
(package private) static int |
cornerDegree |
(package private) static NxtMotor |
motor |
(package private) static NxtSensor |
sensor |
static int[] |
whiteThreshold |
Modifier | Constructor and Description |
---|---|
protected |
Robot.ColorDetector() |
Modifier and Type | Method and Description |
---|---|
private static void |
init()
Initialization
|
static void |
loadDegrees()
Load calibrated color sensor degrees from existing file
|
static void |
loadThresholds()
Load calibrated color sensor white threshold from existing file
|
static void |
setDefaultThresholds()
Set white thresholds to default
|
protected static void |
setMotorDefaultDegrees()
Set the color sensor's motor default degrees
|
protected static void |
setMotorDegree(SensorLocation location,
int degree)
Set the color sensor motor degree, called when calibrating the
sensor's motor or setting it to default
|
protected static void |
setMotorLocation(SensorLocation location)
Rotate the color sensor motor to required location
|
static final NxtMotor motor
static final NxtSensor sensor
public static int[] whiteThreshold
static int centerDegree
static int allignDegree
static int cornerDegree
private static void init()
protected static void setMotorDefaultDegrees()
protected static void setMotorLocation(SensorLocation location)
location
- The location to rotate toprotected static void setMotorDegree(SensorLocation location, int degree)
location
- The location to set degree ofdegree
- The degree to setloadDegrees()
,
setMotorDefaultDegrees()
public static void loadThresholds()
In case of calibration file not exist or error while reading - default thresholds will be loaded
public static void loadDegrees()
In case of calibration file not exist or error while reading - default thresholds will be loaded
public static void setDefaultThresholds()