You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is going to take some thinking/experimentation on the best representation for channels, particularly in appstate.
a list of channels each channel sharing a single Light
but also you need to have a list of PeripheralIds for the channel, to switch individual devices between channels.
We're also somewhat limited by what we can implement the druid List trait for, which requires iter_mut.
I believe the easiest thing is to make it a Vector<((PeripheralId, Light), Arc<BTreeMap<PeripheralId, Light>>)>
But that means we get to go hunting through a vec of HashMaps, when the device changes underneath the gui.
and a [Vector<PeripheralId>; 8] or something in the backend.
I suppose the problem with this is that, I either need to rebuild the DeviceMode when switching modes,
or have a way to access the state and synchronize the copy of the state that the prism is not currently in.
which will require thought...
The text was updated successfully, but these errors were encountered:
Along with an impl Prism<AppState, ..> for ...,
Which is a bit odd, because its implementing Prism for a struct which holds an enum, rather than being an enum itself.
But need to see how these non-enum prisms work out...
This would overall be good because it means we've bounded the amount of work that needs to be done in the idle callback to the number of channels.
It is going to take some thinking/experimentation on the best representation for channels, particularly in
appstate
.Light
PeripheralId
s for the channel, to switch individual devices between channels.We're also somewhat limited by what we can implement the druid
List
trait for, which requiresiter_mut
.I believe the easiest thing is to make it a
Vector<((PeripheralId, Light), Arc<BTreeMap<PeripheralId, Light>>)>
But that means we get to go hunting through a vec of HashMaps, when the device changes underneath the gui.
the alternative is making it something like:
and a
[Vector<PeripheralId>; 8]
or something in the backend.I suppose the problem with this is that, I either need to rebuild the DeviceMode when switching modes,
or have a way to access the state and synchronize the copy of the state that the prism is not currently in.
which will require thought...
The text was updated successfully, but these errors were encountered: