calibration started

This commit is contained in:
Wolfgang Hottgenroth
2014-11-19 22:25:33 +01:00
parent 9ab050c430
commit f201ce5c4a
5 changed files with 71 additions and 39 deletions

View File

@ -14,13 +14,15 @@ public:
void begin(uint8_t csPin, uint8_t drdyPin, bool initializeConfig, int eepromAddr);
void exec();
float calFactor;
float calOffset;
float getCalFactor() const { return m_calFactor; };
float getCalOffset() const { return m_calOffset; };
void setCalFactor(float calFactor);
void setCalOffset(float calOffset);
uint32_t value;
float u;
float rRaw;
float r;
uint32_t getValue() const { return m_value; };
float getU() const { return m_u; };
float getRRaw() const { return m_rRaw; };
float getR() const { return m_r; };
private:
// register addresses
const uint8_t ADDR_DOR2 = 0x00;
@ -84,6 +86,13 @@ private:
uint8_t m_drdyPin;
int m_eepromAddr;
float m_calFactor;
float m_calOffset;
uint32_t m_value;
float m_u;
float m_rRaw;
float m_r;
void enableCS() const;
void disableCS() const;