mirror of
https://github.com/nikdoof/hapz2m.git
synced 2026-01-30 02:18:22 +00:00
Introduce constructors for ExposeMapping
This should allow the ExposeMapping struct to be changed without constantly impacting its callers.
This commit is contained in:
@@ -24,7 +24,7 @@ func createMotionServices(dev *Device) (byte, []*service.S, []*ExposeMapping, er
|
||||
s := service.NewMotionSensor()
|
||||
|
||||
svcs = append(svcs, s.S)
|
||||
exposes = append(exposes, &ExposeMapping{&exp, s.MotionDetected.C, nil})
|
||||
exposes = append(exposes, NewExposeMapping(&exp, s.MotionDetected.C))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user