mirror of
https://github.com/nikdoof/hapz2m.git
synced 2026-01-30 04:38:20 +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:
@@ -22,7 +22,7 @@ func createBatteryServices(dev *Device) (byte, []*service.S, []*ExposeMapping, e
|
||||
batt.ChargingState.SetValue(characteristic.ChargingStateNotChargeable)
|
||||
|
||||
svcs = append(svcs, batt.S)
|
||||
exposes = append(exposes, &ExposeMapping{&exp, batt.BatteryLevel.C, nil})
|
||||
exposes = append(exposes, NewExposeMapping(&exp, batt.BatteryLevel.C))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user