calibration works so far

This commit is contained in:
hg
2014-03-04 22:53:40 +01:00
parent f2162af9c6
commit 1edb73afbf
2 changed files with 97 additions and 27 deletions

View File

@ -52,13 +52,17 @@ public:
virtual String getCmdName() { return "TCALIBR"; }
virtual String getHelp() { return "Thermometer calibration operations"; }
virtual String exec(String params);
friend class Thermometer;
private:
Thermometer *m_thermometer;
bool m_enabled;
unsigned int m_cycles;
bool m_start_calibration;
float m_r_cal;
float m_preserved_alpha;
unsigned long m_preserved_period;
unsigned int m_channel;
unsigned int m_turn;
float m_r_sum;
};
class Thermometer {
@ -74,6 +78,7 @@ private:
unsigned long m_periodMillis;
ThermConfig thermConfig;
ThermValues thermValues;
ThermCalibrate thermCalibrate;
bool m_debug;
bool m_info;
@ -88,6 +93,8 @@ private:
float m_alpha;
bool m_calibrationMode;
void startSingleConv();
void prepareAdc();