Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

typo fix for 'readFahrenheit' function #3

Merged
merged 2 commits into from

2 participants

@jamessanford

Rename function to readFahrenheit but keep the old readFarenheit around as an alias.

James Sanford added some commits
James Sanford Fix typo for readFahrenheit.
Keep old method for existing users.
8438080
James Sanford Examples updated to use readFahrenheit() 27ed532
@ladyada
Owner

oi. spelling!

@ladyada ladyada merged commit db807c5 into adafruit:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 24, 2012
  1. Fix typo for readFahrenheit.

    James Sanford authored
    Keep old method for existing users.
  2. Examples updated to use readFahrenheit()

    James Sanford authored
This page is out of date. Refresh to see the latest.
View
2  examples/lcdthermocouple/lcdthermocouple.pde
@@ -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
View
2  examples/serialthermocouple/serialthermocouple.pde
@@ -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
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);
Something went wrong with that request. Please try again.