1
0
mirror of https://github.com/kidoman/embd synced 2024-06-07 19:47:48 +02:00

us020: add prefix us020 to log messages

This commit is contained in:
Karan Misra 2014-01-09 03:06:57 +05:30
parent 7809d9d6ba
commit 1b5a3a40c3

View File

@ -86,7 +86,7 @@ func (d *us020) Distance() (distance float64, err error) {
} }
if d.debug { if d.debug {
log.Print("trigerring pulse") log.Print("us020: trigerring pulse")
} }
// Generate a TRIGGER pulse // Generate a TRIGGER pulse
@ -95,7 +95,7 @@ func (d *us020) Distance() (distance float64, err error) {
d.triggerPin.Low() d.triggerPin.Low()
if d.debug { if d.debug {
log.Print("waiting for echo to go high") log.Print("us020: waiting for echo to go high")
} }
// Wait until ECHO goes high // Wait until ECHO goes high
@ -105,7 +105,7 @@ func (d *us020) Distance() (distance float64, err error) {
startTime := time.Now() // Record time when ECHO goes high startTime := time.Now() // Record time when ECHO goes high
if d.debug { if d.debug {
log.Print("waiting for echo to go low") log.Print("us020: waiting for echo to go low")
} }
// Wait until ECHO goes low // Wait until ECHO goes low