1
0
Fork 0
mirror of https://github.com/kidoman/embd synced 2025-07-03 11:57:38 +02:00

- use glog instead of Debug flag

- use glog instead of log
- make code conform to the Go code guidelines
This commit is contained in:
Karan Misra 2014-03-31 18:46:04 +05:30
parent ca17879e6e
commit 9ab49745bc
23 changed files with 554 additions and 703 deletions

View file

@ -3,7 +3,7 @@
package main
import (
"log"
"fmt"
"time"
"github.com/kidoman/embd"
@ -24,19 +24,19 @@ func main() {
for {
temp, err := baro.Temperature()
if err != nil {
log.Panic(err)
panic(err)
}
log.Printf("Temp is %v", temp)
fmt.Printf("Temp is %v\n", temp)
pressure, err := baro.Pressure()
if err != nil {
log.Panic(err)
panic(err)
}
log.Printf("Pressure is %v", pressure)
fmt.Printf("Pressure is %v\n", pressure)
altitude, err := baro.Altitude()
if err != nil {
log.Panic(err)
panic(err)
}
log.Printf("Altitude is %v", altitude)
fmt.Printf("Altitude is %v\n", altitude)
time.Sleep(500 * time.Millisecond)
}