Skip to content

Commit 44390f7

Browse files
committed
Minor fix and spacing correction
1 parent c720ea0 commit 44390f7

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

examples/ReadSensor/ReadSensor.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ void setup() {
2626
void loop() {
2727

2828
Serial.print("ref ");
29-
Serial.print(THERM.readRefTemperature());
29+
Serial.print(THERM.readInternalTemperature());
3030
Serial.println(" °C");
3131

3232
Serial.print("celcius ");
33-
Serial.print(THERM.readCelsiusTemperature());
33+
Serial.print(THERM.readTemperature());
3434
Serial.println(" °C");
3535

3636
Serial.println();

src/MKRTherm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ float THERMClass::readTemperature()
8686
rawword >>= 18;
8787
}
8888
// multiply for the LSB value
89-
celsius = rawword*0.25f;
89+
celsius = rawword * 0.25f;
9090

9191
return celsius;
9292
}

src/MKRTherm.h

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,11 @@
2222
#define _MKRTHERM_H_
2323

2424

25-
#include "Arduino.h"
25+
#include <Arduino.h>
2626
#include <SPI.h>
2727

2828

2929
class THERMClass {
30-
private:
31-
uint32_t readSensor();
32-
33-
int _cs;
34-
SPIClass* _spi;
35-
SPISettings _spiSettings;
36-
3730
public:
3831
THERMClass(int cs = A4, SPIClass& spi = SPI);
3932

@@ -43,6 +36,14 @@ class THERMClass {
4336

4437
float readTemperature();
4538
float readInternalTemperature();
39+
40+
private:
41+
uint32_t readSensor();
42+
43+
int _cs;
44+
SPIClass* _spi;
45+
SPISettings _spiSettings;
46+
4647
};
4748

4849
extern THERMClass THERM;

0 commit comments

Comments
 (0)