diff --git a/device.go b/device.go index c5f57061..8a15ac98 100644 --- a/device.go +++ b/device.go @@ -17,6 +17,11 @@ func NewDevice(driver interface{}, r *Robot) *Device { d := new(Device) d.Name = reflect.ValueOf(driver).Elem().FieldByName("Name").String() d.Robot = r + interval := reflect.ValueOf(driver).Elem().FieldByName("Interval").String() + if interval == "" { + interval = "0.1s" + } + reflect.ValueOf(driver).Elem().FieldByName("Interval").SetString(interval) d.Driver = driver return d }