Implement the 'Left' button on the remote

This commit is contained in:
Sven van Heugten 2026-01-14 19:49:34 +01:00
parent 6ecb6d07ac
commit 2950b21488
7 changed files with 91 additions and 19 deletions

View file

@ -9,10 +9,31 @@ type ArbitraryLight =
type ArbitraryNonRemotelyControlledLight =
static member Light() =
lights
|> Seq.filter (not << _.ControlledWithRemote)
|> Seq.filter _.ControlledWithRemote.IsNonRemote
|> Gen.elements
|> Arb.fromGen
type ArbitraryLeftRemotelyControlledLight =
static member Light() =
lights
|> Seq.filter _.ControlledWithRemote.IsRemoteLeft
|> Gen.elements
|> Arb.fromGen
type ArbitraryRightRemotelyControlledLight =
static member Light() =
lights
|> Seq.filter _.ControlledWithRemote.IsRemoteRight
|> Gen.elements
|> Arb.fromGen
type ArbitraryRemotelyControlledLight =
static member Light() =
lights |> Seq.filter _.ControlledWithRemote |> Gen.elements |> Arb.fromGen
lights
|> Seq.filter (fun light ->
match light.ControlledWithRemote with
| RemoteLeft -> true
| RemoteRight -> true
| NonRemote -> false)
|> Gen.elements
|> Arb.fromGen