Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix typo for readFahrenheit.

Keep old method for existing users.
commit 84380801cef97060d825db7aea46b92ef5dd2be7 1 parent bc9d341
James Sanford authored
Showing with 5 additions and 2 deletions.
  1. +1 −0  keywords.txt
  2. +1 −1  max6675.cpp
  3. +3 −1 max6675.h
View
1  keywords.txt
@@ -13,6 +13,7 @@ max6675 KEYWORD1
#######################################
readCelsius KEYWORD2
+readFahrenheit KEYWORD2
readFarenheit KEYWORD2
#######################################
View
2  max6675.cpp
@@ -42,7 +42,7 @@ double MAX6675::readCelsius(void) {
return v*0.25;
}
-double MAX6675::readFarenheit(void) {
+double MAX6675::readFahrenheit(void) {
return readCelsius() * 9.0/5.0 + 32;
}
View
4 max6675.h
@@ -12,7 +12,9 @@ class MAX6675 {
MAX6675(int8_t SCLK, int8_t CS, int8_t MISO);
double readCelsius(void);
- double readFarenheit(void);
+ double readFahrenheit(void);
+ // For compatibility with older versions:
+ double readFarenheit(void) { return readFahrenheit(); }
private:
int8_t sclk, miso, cs;
uint8_t spiread(void);
Please sign in to comment.
Something went wrong with that request. Please try again.