mirror of
https://github.com/hybridgroup/gobot.git
synced 2025-04-26 13:48:49 +08:00
aio: ensure that AnalogSensor event Data is always int
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
parent
b250670ccb
commit
c9ec619219
@ -56,7 +56,7 @@ func NewAnalogSensorDriver(a AnalogReader, pin string, v ...time.Duration) *Anal
|
||||
// Data int - Event is emitted on change and represents the current reading from the sensor.
|
||||
// Error error - Event is emitted on error reading from the sensor.
|
||||
func (a *AnalogSensorDriver) Start() (err error) {
|
||||
value := 0
|
||||
var value int = 0
|
||||
go func() {
|
||||
timer := time.NewTimer(a.interval)
|
||||
timer.Stop()
|
||||
|
Loading…
x
Reference in New Issue
Block a user