|
Files | |
file | dexterind-flex.h |
ROBOTC Dexter Industries dFlex Sensor driver. | |
Defines | |
#define | DFLEXDAT "DFLEX.dat" |
Functions | |
int | DFLEXvalRaw (tSensors link) |
int | DFLEXvalNorm (tSensors link) |
void | DFLEXcalLow (tSensors link) |
void | DFLEXcalLow (int lowval) |
void | DFLEXcalHigh (tSensors link) |
void | DFLEXcalHigh (int highval) |
void | _DFLEXcheckSensor (tSensors link) |
void | _DFLEXwriteCalVals (int lowval, int highval) |
void | _DFLEXreadCalVals (int &lowval, int &highval) |
Variables | |
int | dflexlow = 0 |
int | dflexhigh = 1023 |
bool | DFLEX_calibrated = false |
Dexter Industries dFlex Sensor driver
#define DFLEXDAT "DFLEX.dat" |
Datafile for dFlex Sensor calibration info
Definition at line 42 of file dexterind-flex.h.
void _DFLEXcheckSensor | ( | tSensors | link ) |
Check if the sensor is set to raw and that it's been configured as a sensorAnalogInactive. If not, reconfigure the port.
Note: this is an internal function and should not be called directly
link | the dFlex Sensor port number |
Definition at line 153 of file dexterind-flex.h.
void _DFLEXreadCalVals | ( | int & | lowval, |
int & | highval | ||
) |
Read the low and high calibration values from a data file.
Note: this is an internal function and should not be called directly
lowval | the low calibration value |
highval | the high calibration value |
Definition at line 228 of file dexterind-flex.h.
void _DFLEXwriteCalVals | ( | int | lowval, |
int | highval | ||
) |
Write the low and high calibration values to a data file.
Note: this is an internal function and should not be called directly
lowval | the low calibration value |
highval | the high calibration value |
Definition at line 168 of file dexterind-flex.h.
void DFLEXcalHigh | ( | int | highval ) |
Calibrate the dFlex Sensor's high calibration value with the supplied value.
highval | the sensor's high calibration value |
Definition at line 140 of file dexterind-flex.h.
void DFLEXcalHigh | ( | tSensors | link ) |
Calibrate the dFlex Sensor's high calibration value with the current raw sensor reading.
link | the dFlex Sensor port number |
Definition at line 128 of file dexterind-flex.h.
void DFLEXcalLow | ( | int | lowval ) |
Calibrate the dFlex Sensor's low calibration value with the supplied value.
lowval | the sensor's low calibration value |
Definition at line 118 of file dexterind-flex.h.
void DFLEXcalLow | ( | tSensors | link ) |
Calibrate the dFlex Sensor's low calibration value with the current raw sensor reading.
link | the dFlex Sensor port number |
Definition at line 106 of file dexterind-flex.h.
int DFLEXvalNorm | ( | tSensors | link ) |
Read the normalised value of the dFlex Sensor, based on the low and high values.
Note: this is not a linear value
link | the dFlex Sensor port number |
Definition at line 82 of file dexterind-flex.h.
int DFLEXvalRaw | ( | tSensors | link ) |
Read the raw value of the dFlex Sensor.
link | the dFlex Sensor port number |
Definition at line 68 of file dexterind-flex.h.
bool DFLEX_calibrated = false |
Has the sensor been calibrated yet
Definition at line 47 of file dexterind-flex.h.
int dflexhigh = 1023 |
High calibration value
Definition at line 46 of file dexterind-flex.h.
int dflexlow = 0 |
Low calibration value
Definition at line 45 of file dexterind-flex.h.