Skip to content

Commit

Permalink
Fix typo for readFahrenheit.
Browse files Browse the repository at this point in the history
Keep old method for existing users.
  • Loading branch information
James Sanford committed Mar 24, 2012
1 parent bc9d341 commit 8438080
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions keywords.txt
Expand Up @@ -13,6 +13,7 @@ max6675 KEYWORD1
####################################### #######################################


readCelsius KEYWORD2 readCelsius KEYWORD2
readFahrenheit KEYWORD2
readFarenheit KEYWORD2 readFarenheit KEYWORD2


####################################### #######################################
Expand Down
2 changes: 1 addition & 1 deletion max6675.cpp
Expand Up @@ -42,7 +42,7 @@ double MAX6675::readCelsius(void) {
return v*0.25; return v*0.25;
} }


double MAX6675::readFarenheit(void) { double MAX6675::readFahrenheit(void) {
return readCelsius() * 9.0/5.0 + 32; return readCelsius() * 9.0/5.0 + 32;
} }


Expand Down
4 changes: 3 additions & 1 deletion max6675.h
Expand Up @@ -12,7 +12,9 @@ class MAX6675 {
MAX6675(int8_t SCLK, int8_t CS, int8_t MISO); MAX6675(int8_t SCLK, int8_t CS, int8_t MISO);


double readCelsius(void); double readCelsius(void);
double readFarenheit(void); double readFahrenheit(void);
// For compatibility with older versions:
double readFarenheit(void) { return readFahrenheit(); }
private: private:
int8_t sclk, miso, cs; int8_t sclk, miso, cs;
uint8_t spiread(void); uint8_t spiread(void);
Expand Down

0 comments on commit 8438080

Please sign in to comment.