|
|
@ -47,6 +47,9 @@ |
|
|
|
|
|
|
|
|
|
|
|
#define SENSOR_COUNT_MAX 3 |
|
|
|
#define SENSOR_COUNT_MAX 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TC_ERROR_INITIAL_TEMP_TOO_HIGH 110 ///< starting temperature was above the configured allowed temperature
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Base class for temperature calibration types with abstract methods (for all different sensor types) |
|
|
|
* Base class for temperature calibration types with abstract methods (for all different sensor types) |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -61,7 +64,8 @@ public: |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* check & update new sensor data. |
|
|
|
* check & update new sensor data. |
|
|
|
* @return progress in range [0, 100], 110 when finished, <0 on error, -110 if starting temperature is too hot |
|
|
|
* @return progress in range [0, 100], 110 when finished, <0 on error, |
|
|
|
|
|
|
|
* -TC_ERROR_INITIAL_TEMP_TOO_HIGH if starting temperature is too hot |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
virtual int update() = 0; |
|
|
|
virtual int update() = 0; |
|
|
|
|
|
|
|
|
|
|
@ -131,8 +135,8 @@ public: |
|
|
|
if (status == -1) { |
|
|
|
if (status == -1) { |
|
|
|
return -1; |
|
|
|
return -1; |
|
|
|
|
|
|
|
|
|
|
|
} else if (status == -110) { |
|
|
|
} else if (status == -TC_ERROR_INITIAL_TEMP_TOO_HIGH) { |
|
|
|
return -110; |
|
|
|
return -TC_ERROR_INITIAL_TEMP_TOO_HIGH; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
num_not_complete += status; |
|
|
|
num_not_complete += status; |
|
|
@ -177,7 +181,7 @@ protected: |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* update a single sensor instance |
|
|
|
* update a single sensor instance |
|
|
|
* @return 0 when done, 1 not finished yet, -1 for an error that requires the test to be repeated |
|
|
|
* @return 0 when done, 1 not finished yet, <0 for an error |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
virtual int update_sensor_instance(PerSensorData &data, int sensor_sub) = 0; |
|
|
|
virtual int update_sensor_instance(PerSensorData &data, int sensor_sub) = 0; |
|
|
|
|
|
|
|
|
|
|
|