Skip to content

Commit dc47379

Browse files
committed
+ version 0.1.04
+ float replaced by double to support ARM
1 parent b3c0f3e commit dc47379

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

libraries/MAX31855/MAX31855.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
//
22
// FILE: MAX31855.cpp
33
// AUTHOR: Rob Tillaart
4-
// VERSION: 0.1.03
4+
// VERSION: 0.1.04
55
// PURPOSE: MAX31855 - Thermocouple
66
// DATE: 2014-01-01
77
// URL:
88
//
99
// HISTORY:
10+
// 0.1.04 2015-03-09 replaced float -> double (ARM support)
1011
// 0.1.03 fixed negative temperature
1112
// 0.1.02 added offset
1213
// 0.1.01 refactored speed/performance

libraries/MAX31855/MAX31855.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
#ifndef MAX31855_H
2-
#define MAX31855_H
31
//
42
// FILE: MAX31855.h
53
// AUTHOR: Rob Tillaart
6-
// VERSION: 0.1.03
4+
// VERSION: 0.1.04
75
// PURPOSE: MAX31855 - Thermocouple
86
// DATE: 2014-01-01
97
// URL:
108
//
119
// Released to the public domain
1210
//
11+
#ifndef MAX31855_H
12+
#define MAX31855_H
1313

1414
#if (ARDUINO < 100)
1515
#include "WProgram.h"
1616
#else
1717
#include "Arduino.h"
1818
#endif
1919

20-
#define MAX31855_VERSION "0.1.03"
20+
#define MAX31855_VERSION "0.1.04"
2121

2222
#define STATUS_OK 0x00
2323
#define STATUS_OPEN_CIRCUIT 0x01
@@ -29,22 +29,22 @@ class MAX31855
2929
public:
3030
MAX31855(uint8_t SCLK, uint8_t CS, uint8_t MISO);
3131
void begin();
32+
3233
uint8_t read();
33-
float getInternal(void) { return _internal; };
34-
// Celsius
35-
float getTemperature(void) { return _temperature; };
36-
uint8_t getStatus(void) {return _status; };
3734

38-
void setOffset(float t) { _offset = t; };
39-
float getOffset(float t) { return _offset; };
35+
double getInternal(void) { return _internal; };
36+
double getTemperature(void) { return _temperature; };
37+
uint8_t getStatus(void) { return _status; };
4038

39+
void setOffset(double t) { _offset = t; };
40+
double getOffset() { return _offset; };
4141

4242
private:
43-
uint32_t _read();
44-
float _internal;
45-
float _temperature;
43+
uint32_t _read();
44+
double _internal;
45+
double _temperature;
4646
uint8_t _status;
47-
float _offset;
47+
double _offset;
4848

4949
uint8_t _sclk;
5050
uint8_t _miso;
@@ -53,4 +53,4 @@ class MAX31855
5353

5454
#endif
5555

56-
// END OF FILE
56+
// END OF FILE

0 commit comments

Comments
 (0)