Skip to content

Commit

Permalink
fix celsius symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
conejoninja authored and deadprogram committed Feb 8, 2020
1 parent 2034f92 commit 0519540
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion adt7410/adt7410.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (dev *Device) Configure() (err error) {

}

// ReadTemperature returns the temperature in celsius milli degrees (ºC/1000)
// ReadTemperature returns the temperature in celsius milli degrees (°C/1000)
func (d *Device) ReadTemperature() (temperature int32, err error) {
return (int32(d.readUint16(RegTempValueMSB)) * 1000) / 128, nil
}
Expand Down
2 changes: 1 addition & 1 deletion bme280/bme280.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (d *Device) Reset() {
d.bus.WriteRegister(uint8(d.Address), CMD_RESET, []byte{0xB6})
}

// ReadTemperature returns the temperature in celsius milli degrees (ºC/1000)
// ReadTemperature returns the temperature in celsius milli degrees (°C/1000)
func (d *Device) ReadTemperature() (int32, error) {
data, err := d.readData()
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion bmp180/bmp180.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (d *Device) Configure() {
d.calibrationCoefficients.md = readInt(data[20], data[21])
}

// ReadTemperature returns the temperature in celsius milli degrees (ºC/1000).
// ReadTemperature returns the temperature in celsius milli degrees (°C/1000).
func (d *Device) ReadTemperature() (temperature int32, err error) {
rawTemp, err := d.rawTemp()
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion drivers.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
//
// for {
// temp, _ := sensor.ReadTemperature()
// println("Temperature:", float32(temp)/1000, "ºC")
// println("Temperature:", float32(temp)/1000, "°C")
//
// pressure, _ := sensor.ReadPressure()
// println("Pressure", float32(pressure)/100000, "hPa")
Expand Down
2 changes: 1 addition & 1 deletion examples/bme280/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func main() {

for {
temp, _ := sensor.ReadTemperature()
println("Temperature:", strconv.FormatFloat(float64(temp)/1000, 'f', 2, 64), "ºC")
println("Temperature:", strconv.FormatFloat(float64(temp)/1000, 'f', 2, 64), "°C")
press, _ := sensor.ReadPressure()
println("Pressure:", strconv.FormatFloat(float64(press)/100000, 'f', 2, 64), "hPa")
hum, _ := sensor.ReadHumidity()
Expand Down
2 changes: 1 addition & 1 deletion examples/bmp180/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func main() {

for {
temp, _ := sensor.ReadTemperature()
println("Temperature:", float32(temp)/1000, "ºC")
println("Temperature:", float32(temp)/1000, "°C")

pressure, _ := sensor.ReadPressure()
println("Pressure", float32(pressure)/100000, "hPa")
Expand Down
2 changes: 1 addition & 1 deletion examples/ds3231/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func main() {
fmt.Printf("Date: %d/%s/%02d %02d:%02d:%02d \r\n", dt.Year(), dt.Month(), dt.Day(), dt.Hour(), dt.Minute(), dt.Second())
}
temp, _ := rtc.ReadTemperature()
fmt.Printf("Temperature: %.2f ºC \r\n", float32(temp)/1000)
fmt.Printf("Temperature: %.2f °C \r\n", float32(temp)/1000)

time.Sleep(time.Second * 1)
}
Expand Down
2 changes: 1 addition & 1 deletion examples/mag3110/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func main() {
println("Magnetic readings:", x, y, z)

c, _ := mag.ReadTemperature()
println("Temperature:", float32(c)/1000, "ºC")
println("Temperature:", float32(c)/1000, "°C")

time.Sleep(time.Millisecond * 100)
}
Expand Down
2 changes: 1 addition & 1 deletion examples/sht3x/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func main() {
temp, humidity, _ := sensor.ReadTemperatureHumidity()
t := fmt.Sprintf("%.2f", float32(temp)/1000)
h := fmt.Sprintf("%.2f", float32(humidity)/100)
println("Temperature:", t, "ºC")
println("Temperature:", t, "°C")
println("Humidity", h, "%")
time.Sleep(2 * time.Second)
}
Expand Down
2 changes: 1 addition & 1 deletion examples/thermistor/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func main() {

for {
temp, _ := sensor.ReadTemperature()
println("Temperature:", temp/1000, "ºC")
println("Temperature:", temp/1000, "°C")

time.Sleep(2 * time.Second)
}
Expand Down
2 changes: 1 addition & 1 deletion lsm6ds3/lsm6ds3.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func (d *Device) ReadRotation() (x int32, y int32, z int32) {
return
}

// ReadTemperature returns the temperature in celsius milli degrees (ºC/1000)
// ReadTemperature returns the temperature in celsius milli degrees (°C/1000)
func (d *Device) ReadTemperature() (int32, error) {
d.bus.ReadRegister(uint8(d.Address), OUT_TEMP_L, d.dataBufferTwo)

Expand Down
2 changes: 1 addition & 1 deletion mag3110/mag3110.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (d Device) ReadMagnetic() (x int16, y int16, z int16) {
}

// ReadTemperature reads and returns the current die temperature in
// celsius milli degrees (ºC/1000).
// celsius milli degrees (°C/1000).
func (d Device) ReadTemperature() (int32, error) {
data := make([]byte, 1)
d.bus.ReadRegister(uint8(d.Address), DIE_TEMP, data)
Expand Down
2 changes: 1 addition & 1 deletion sht3x/sht3x.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func New(bus machine.I2C) Device {
}
}

// Read returns the temperature in celsius milli degrees (ºC/1000).
// Read returns the temperature in celsius milli degrees (°C/1000).
func (d *Device) ReadTemperature() (tempMilliCelsius int32, err error) {
tempMilliCelsius, _, err = d.ReadTemperatureHumidity()
return tempMilliCelsius, err
Expand Down
2 changes: 1 addition & 1 deletion thermistor/thermistor.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (d *Device) Configure() {
d.adc.Configure()
}

// ReadTemperature returns the temperature in celsius milli degrees (ºC/1000)
// ReadTemperature returns the temperature in celsius milli degrees (°C/1000)
func (d *Device) ReadTemperature() (temperature int32, err error) {
var reading uint32
if d.HighSide {
Expand Down

0 comments on commit 0519540

Please sign in to comment.