File tree Expand file tree Collapse file tree 3 files changed +19
-3
lines changed
Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,14 @@ public sealed class StateRequest
5151 [ JsonPropertyName ( "seg" ) ]
5252 [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
5353 public SegmentRequest [ ] ? Segments { get ; set ; } = null ! ;
54-
54+
55+ /// <summary>
56+ /// Timebase for effects.
57+ /// </summary>
58+ [ JsonPropertyName ( "tb" ) ]
59+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
60+ public int ? Timebase { get ; set ; }
61+
5562 public static StateRequest From ( StateResponse stateResponse )
5663 {
5764 return new StateRequest ( )
@@ -65,7 +72,8 @@ public static StateRequest From(StateResponse stateResponse)
6572 UdpPackets = stateResponse . UdpPackets ,
6673 LiveDataOverride = stateResponse . LiveDataOverride ,
6774 MainSegment = stateResponse . MainSegment ,
68- Segments = stateResponse . Segments . Select ( SegmentRequest . From ) . ToArray ( )
75+ Segments = stateResponse . Segments . Select ( SegmentRequest . From ) . ToArray ( ) ,
76+ Timebase = stateResponse . Timebase
6977 } ;
7078 }
7179
Original file line number Diff line number Diff line change @@ -61,4 +61,11 @@ public sealed class StateResponse
6161 /// </summary>
6262 [ JsonPropertyName ( "seg" ) ]
6363 public SegmentResponse [ ] Segments { get ; set ; } = null ! ;
64+
65+ /// <summary>
66+ /// Timebase for effects.
67+ /// </summary>
68+ [ JsonPropertyName ( "tb" ) ]
69+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
70+ public int ? Timebase { get ; set ; }
6471}
Original file line number Diff line number Diff line change @@ -44,7 +44,8 @@ public static string CreateStateJson(StateResponse state)
4444 ""on"": { seg . SegmentState . ToString ( ) . ToLower ( ) } ,
4545 ""bri"": { seg . Brightness }
4646 }}" ;
47- } ) ) } ]
47+ } ) ) } ],
48+ ""tb"": { state . Timebase }
4849 }}" ;
4950 }
5051
You can’t perform that action at this time.
0 commit comments