Permalink
Browse files

Merge pull request #3 from jamessanford/typo_fahrenheit

typo fix for 'readFahrenheit' function
  • Loading branch information...
2 parents bc9d341 + 27ed532 commit db807c562f46eb0783838a1cc016c9bdfb22a267 @ladyada ladyada committed Mar 26, 2012
@@ -46,7 +46,7 @@ void loop() {
lcd.print(0, BYTE);
#endif
lcd.print("C ");
- lcd.print(thermocouple.readFarenheit());
+ lcd.print(thermocouple.readFahrenheit());
#if ARDUINO >= 100
lcd.write((byte)0);
#else
@@ -28,7 +28,7 @@ void loop() {
Serial.print("C = ");
Serial.println(thermocouple.readCelsius());
Serial.print("F = ");
- Serial.println(thermocouple.readFarenheit());
+ Serial.println(thermocouple.readFahrenheit());
delay(1000);
}
View
@@ -13,6 +13,7 @@ max6675 KEYWORD1
#######################################
readCelsius KEYWORD2
+readFahrenheit KEYWORD2
readFarenheit KEYWORD2
#######################################
View
@@ -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
@@ -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);

0 comments on commit db807c5

Please sign in to comment.