major reorg
This commit is contained in:
44
thermometer.h
Normal file
44
thermometer.h
Normal file
@ -0,0 +1,44 @@
|
||||
/*
|
||||
* thermometer.h
|
||||
*
|
||||
* Created on: 24.02.2014
|
||||
* Author: wn
|
||||
*/
|
||||
|
||||
#ifndef THERMOMETER_H_
|
||||
#define THERMOMETER_H_
|
||||
|
||||
#include <Metro.h>
|
||||
#include "cmd.h"
|
||||
|
||||
const bool DEBUG = false;
|
||||
const bool INFO = true;
|
||||
|
||||
const unsigned long DEFAULT_PERIOD = 10000;
|
||||
const unsigned int NUM_OF_CHANNELS = 4;
|
||||
const unsigned long N_MAX = 0xffffff;
|
||||
const float R_REF = 6000.0;
|
||||
const float PT1000_R0 = 1000.0;
|
||||
const float PT1000_Coeff = 3.85e-3;
|
||||
const unsigned long CONV_TIMEOUT = 0xfffff;
|
||||
|
||||
|
||||
class Thermometer {
|
||||
public:
|
||||
Thermometer();
|
||||
void begin(CmdServer *cmdServer);
|
||||
void exec();
|
||||
private:
|
||||
Metro m_period;
|
||||
|
||||
unsigned long m_n[NUM_OF_CHANNELS];
|
||||
float m_calibrateFactor[NUM_OF_CHANNELS];
|
||||
float m_temperature[NUM_OF_CHANNELS];
|
||||
unsigned long m_timeOutFailureCnt;
|
||||
|
||||
void setTemperature(unsigned int index, float t);
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /* THERMOMETER_H_ */
|
Reference in New Issue
Block a user