Skip to content
This repository was archived by the owner on Jan 11, 2021. It is now read-only.

Commit cbc126e

Browse files
committed
v1.0.3
Finished implementing LedScanner
1 parent e4ee0d8 commit cbc126e

File tree

11 files changed

+214
-35
lines changed

11 files changed

+214
-35
lines changed

DMX/Entities/LedScanner.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ private set
3939
}
4040

4141
// CH5
42-
private string axisSpeed = "0,00%";
42+
private string axisSpeed = "100,00%";
4343
public string AxisSpeed
4444
{
4545
get { return axisSpeed; }
@@ -119,7 +119,7 @@ public void UpdateAxisSpeed(byte? speed)
119119
public void UpdateDimmerStatus(byte? dimmer)
120120
{
121121
Channels[5] = dimmer ?? 0;
122-
DimmerStatus = string.Format("Dimmed {0:F2}%", 100 * Channels[5] / (double)255);
122+
DimmerStatus = string.Format("{0:F2}%", 100 * Channels[5] / (double)255);
123123
}
124124

125125
// CH7
@@ -169,13 +169,13 @@ public void UpdateGoboRotation(byte? rotation)
169169
Channels[9] = rotation ?? 0;
170170

171171
if (Channels[9] >= 0 && Channels[9] <= 127)
172-
GoboRotation = string.Format("Rotation: {0:F2}°", 360 * Channels[9] / (double)128);
172+
GoboRotation = string.Format("{0:F2}°", 360 * Channels[9] / (double)128);
173173
else if (Channels[9] <= 189)
174-
GoboRotation = "CW fast to slow";
174+
GoboRotation = string.Format("CW {0:F0}%", 100 * (1 - ((Channels[9] - 127) / (double)62))); // 189-127=62 100->0%
175175
else if (Channels[9] <= 193)
176176
GoboRotation = "Stop";
177177
else if (Channels[9] <= 255)
178-
GoboRotation = "CCW slow to fast";
178+
GoboRotation = string.Format("CCW {0:F0}%", 100 * (Channels[9] - 193) / (double)62); // 255-193=62
179179
else
180180
GoboRotation = "??";
181181
}

DMX/Tabs/TabLedMovinghead.xaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@
8787
</GroupBox>
8888
</StackPanel>
8989
<StackPanel>
90-
<GroupBox Header="Pre-Set Colors" Margin="5" Width="140">
91-
<ScrollViewer Height="142">
90+
<GroupBox Header="Pre-Set Colors" Margin="5" Width="120">
91+
<ScrollViewer Height="142" VerticalScrollBarVisibility="Hidden">
9292
<StackPanel>
9393
<RadioButton Name="rbC10_1" Content="Closed" VerticalContentAlignment="Center" Checked="Rb_ColorsChecked"/>
9494
<RadioButton Name="rbC10_2" Content="Open / White" VerticalContentAlignment="Center" Checked="Rb_ColorsChecked"/>
@@ -110,8 +110,8 @@
110110
</StackPanel>
111111
</ScrollViewer>
112112
</GroupBox>
113-
<GroupBox Header="Auto Programs" Margin="5" Width="140">
114-
<ScrollViewer Height="142">
113+
<GroupBox Header="Auto Programs" Margin="5" Width="120">
114+
<ScrollViewer Height="142" VerticalScrollBarVisibility="Hidden">
115115
<StackPanel>
116116
<RadioButton Name="rbC12_1" Content="No function" VerticalContentAlignment="Center" Checked="Rb_ProgramsChecked"/>
117117
<RadioButton Name="rbC12_2" Content="Auto program 1" VerticalContentAlignment="Center" Checked="Rb_ProgramsChecked"/>
@@ -135,8 +135,8 @@
135135
</GroupBox>
136136
</StackPanel>
137137
<StackPanel>
138-
<GroupBox Header="Gobo's" Margin="5" Width="100">
139-
<ScrollViewer Height="320">
138+
<GroupBox Header="Gobo's" Margin="5" Width="80">
139+
<ScrollViewer Height="320" VerticalScrollBarVisibility="Hidden">
140140
<StackPanel>
141141
<RadioButton Name="rbC13_1" VerticalContentAlignment="Center" Checked="Rb_GobosChecked">
142142
<Image Source="/DMX;component/Resources/Images/Gobo Open.PNG" Height="40" Width="50"/>

DMX/Tabs/TabLedScanner.xaml

Lines changed: 143 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,152 @@
11
<TabItem x:Class="DMX.Tabs.TabLedScanner"
22
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
34
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4-
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5-
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6-
xmlns:local="clr-namespace:DMX.Tabs"
5+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
76
mc:Ignorable="d"
87
d:DesignHeight="{Binding RelativeSource={RelativeSource Mode=Self}, Path=Parent.ActualHeight}"
9-
d:DesignWidth="{Binding RelativeSource={RelativeSource Mode=Self}, Path=Parent.ActualWidth}">
10-
<!--Header="Ayra LED Scanner">-->
8+
d:DesignWidth="{Binding RelativeSource={RelativeSource Mode=Self}, Path=Parent.ActualWidth}"
9+
Header="{Binding Name}">
1110
<Grid Background="#FFEEEEEE">
12-
<Button Content="Button" Height="50" Width="50" Margin="0"/>
11+
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
12+
<StackPanel Orientation="Horizontal">
13+
<StackPanel>
14+
<StackPanel Orientation="Horizontal">
15+
<StackPanel Margin="5,0,0,0" Width="40">
16+
<TextBlock TextAlignment="Center" Padding="0,10" FontSize="10" TextWrapping="Wrap" Height="40" Text="X axis"/>
17+
<Slider Name="sldrChannel1" Maximum="255" Width="20" Height="255" Orientation="Vertical" IsSnapToTickEnabled="True" IsMoveToPointEnabled="True" ValueChanged="SldrRotationX_ValueChanged"/>
18+
</StackPanel>
19+
<StackPanel Margin="0,0,5,0" Width="40">
20+
<TextBlock TextAlignment="Center" Padding="0,5" FontSize="10" TextWrapping="Wrap" Height="40" Text="X axis fine"/>
21+
<Slider Name="sldrChannel2" Maximum="255" Width="20" Height="255" Orientation="Vertical" IsSnapToTickEnabled="True" IsMoveToPointEnabled="True" ValueChanged="SldrRotationX_ValueChanged"/>
22+
</StackPanel>
23+
</StackPanel>
24+
<GroupBox Header="X" Margin="5">
25+
<TextBlock TextAlignment="Center" Padding="5" FontSize="10" TextWrapping="Wrap" Text="{Binding RotationX}"/>
26+
</GroupBox>
27+
</StackPanel>
28+
<StackPanel>
29+
<StackPanel Orientation="Horizontal">
30+
<StackPanel Margin="5,0,0,0" Width="40">
31+
<TextBlock TextAlignment="Center" Padding="0,10" FontSize="10" TextWrapping="Wrap" Height="40" Text="Y axis"/>
32+
<Slider Name="sldrChannel3" Maximum="255" Width="20" Height="255" Orientation="Vertical" IsSnapToTickEnabled="True" IsMoveToPointEnabled="True" ValueChanged="SldrRotationY_ValueChanged"/>
33+
</StackPanel>
34+
<StackPanel Margin="0,0,5,0" Width="40">
35+
<TextBlock TextAlignment="Center" Padding="0,5" FontSize="10" TextWrapping="Wrap" Height="40" Text="Y axis fine"/>
36+
<Slider Name="sldrChannel4" Maximum="255" Width="20" Height="255" Orientation="Vertical" IsSnapToTickEnabled="True" IsMoveToPointEnabled="True" ValueChanged="SldrRotationY_ValueChanged"/>
37+
</StackPanel>
38+
</StackPanel>
39+
<GroupBox Header="Y" Margin="5">
40+
<TextBlock TextAlignment="Center" Padding="5" FontSize="10" TextWrapping="Wrap" Text="{Binding RotationY}"/>
41+
</GroupBox>
42+
</StackPanel>
43+
<StackPanel>
44+
<StackPanel Orientation="Horizontal">
45+
<StackPanel Margin="5,0" Width="60">
46+
<TextBlock TextAlignment="Center" Padding="0,10" FontSize="10" TextWrapping="Wrap" Height="40" Text="Axis speed"/>
47+
<Slider Name="sldrChannel5" Maximum="255" Width="20" Height="255" Orientation="Vertical" IsSnapToTickEnabled="True" IsMoveToPointEnabled="True" ValueChanged="SldrAxisSpeed_ValueChanged"/>
48+
</StackPanel>
49+
</StackPanel>
50+
<GroupBox Header="Speed" Margin="5">
51+
<TextBlock TextAlignment="Center" Padding="5" FontSize="10" Width="50" TextWrapping="Wrap" Text="{Binding AxisSpeed}"/>
52+
</GroupBox>
53+
</StackPanel>
54+
<StackPanel>
55+
<StackPanel Orientation="Horizontal">
56+
<StackPanel Margin="5,0" Width="60">
57+
<TextBlock TextAlignment="Center" Padding="0,10" FontSize="10" TextWrapping="Wrap" Height="40" Text="Dimmer"/>
58+
<Slider Name="sldrChannel6" Maximum="255" Width="20" Height="255" Orientation="Vertical" IsSnapToTickEnabled="True" IsMoveToPointEnabled="True" ValueChanged="SldrDimmerStatus_ValueChanged"/>
59+
</StackPanel>
60+
</StackPanel>
61+
<GroupBox Header="Dimmer" Margin="5">
62+
<TextBlock TextAlignment="Center" Padding="5" FontSize="10" Width="50" TextWrapping="Wrap" Text="{Binding DimmerStatus}"/>
63+
</GroupBox>
64+
</StackPanel>
65+
<StackPanel>
66+
<StackPanel Orientation="Horizontal" Margin="5,0">
67+
<TextBlock TextAlignment="Center" Padding="0,5" FontSize="10" TextWrapping="Wrap" Height="40" Text="Shutter &amp;&#xA;Strobe"/>
68+
<TextBlock Width="115"/>
69+
<TextBlock TextAlignment="Center" Padding="0,5" FontSize="10" TextWrapping="Wrap" Height="40" Text="Gobo&#xA;rotation"/>
70+
</StackPanel>
71+
<StackPanel Orientation="Horizontal">
72+
<StackPanel Width="40">
73+
<Slider Name="sldrChannel7" Maximum="255" Width="20" Height="255" Orientation="Vertical" IsSnapToTickEnabled="True" IsMoveToPointEnabled="True" ValueChanged="SldrShutterStatus_ValueChanged"/>
74+
</StackPanel>
75+
<GroupBox Header="Gobo's" Margin="5,0" Height="255">
76+
<ScrollViewer VerticalScrollBarVisibility="Hidden">
77+
<StackPanel>
78+
<RadioButton Name="rbC9_1" Content="Open" VerticalContentAlignment="Center" Checked="Rb_GobosChecked"/>
79+
<RadioButton Name="rbC9_2" Content="Gobo 1" VerticalContentAlignment="Center" Checked="Rb_GobosChecked"/>
80+
<RadioButton Name="rbC9_3" Content="Gobo 2" VerticalContentAlignment="Center" Checked="Rb_GobosChecked"/>
81+
<RadioButton Name="rbC9_4" Content="Gobo 3" VerticalContentAlignment="Center" Checked="Rb_GobosChecked"/>
82+
<RadioButton Name="rbC9_5" Content="Gobo 4" VerticalContentAlignment="Center" Checked="Rb_GobosChecked"/>
83+
<RadioButton Name="rbC9_6" Content="Gobo 5" VerticalContentAlignment="Center" Checked="Rb_GobosChecked"/>
84+
<RadioButton Name="rbC9_7" Content="Gobo 6" VerticalContentAlignment="Center" Checked="Rb_GobosChecked"/>
85+
<RadioButton Name="rbC9_8" Content="Gobo 7" VerticalContentAlignment="Center" Checked="Rb_GobosChecked"/>
86+
<RadioButton Name="rbC9_9" Content="Gobo 1 shaking" VerticalContentAlignment="Center" Checked="Rb_GobosChecked"/>
87+
<RadioButton Name="rbC9_10" Content="Gobo 2 shaking" VerticalContentAlignment="Center" Checked="Rb_GobosChecked"/>
88+
<RadioButton Name="rbC9_11" Content="Gobo 3 shaking" VerticalContentAlignment="Center" Checked="Rb_GobosChecked"/>
89+
<RadioButton Name="rbC9_12" Content="Gobo 4 shaking" VerticalContentAlignment="Center" Checked="Rb_GobosChecked"/>
90+
<RadioButton Name="rbC9_13" Content="Gobo 5 shaking" VerticalContentAlignment="Center" Checked="Rb_GobosChecked"/>
91+
<RadioButton Name="rbC9_14" Content="Gobo 6 shaking" VerticalContentAlignment="Center" Checked="Rb_GobosChecked"/>
92+
<RadioButton Name="rbC9_15" Content="Gobo 7 shaking" VerticalContentAlignment="Center" Checked="Rb_GobosChecked"/>
93+
<RadioButton Name="rbC9_16" Content="Change CW" VerticalContentAlignment="Center" Checked="Rb_GobosChecked"/>
94+
<RadioButton Name="rbC9_17" Content="Stop" VerticalContentAlignment="Center" Checked="Rb_GobosChecked"/>
95+
<RadioButton Name="rbC9_18" Content="Change CCW" VerticalContentAlignment="Center" Checked="Rb_GobosChecked"/>
96+
</StackPanel>
97+
</ScrollViewer>
98+
</GroupBox>
99+
<StackPanel Width="40">
100+
<Slider Name="sldrChannel10" Maximum="255" Width="20" Height="255" Orientation="Vertical" IsSnapToTickEnabled="True" IsMoveToPointEnabled="True" ValueChanged="SldrGoboRotation_ValueChanged"/>
101+
</StackPanel>
102+
</StackPanel>
103+
<StackPanel Orientation="Horizontal">
104+
<GroupBox Header="Shutter &amp; Strobe" Margin="5">
105+
<TextBlock TextAlignment="Center" Padding="0,5" FontSize="10" Width="100" TextWrapping="Wrap" Text="{Binding ShutterStatus}"/>
106+
</GroupBox>
107+
<GroupBox Header="Rotation" Margin="5">
108+
<TextBlock TextAlignment="Center" Padding="5" FontSize="10" Width="60" TextWrapping="Wrap" Text="{Binding GoboRotation}"/>
109+
</GroupBox>
110+
</StackPanel>
111+
</StackPanel>
112+
<StackPanel>
113+
<GroupBox Header="Pre-Set Colors" Margin="5">
114+
<ScrollViewer Height="112" VerticalScrollBarVisibility="Hidden">
115+
<StackPanel>
116+
<RadioButton Name="rbC8_1" Content="White" VerticalContentAlignment="Center" Checked="Rb_ColorsChecked"/>
117+
<RadioButton Name="rbC8_2" Content="Color 1" VerticalContentAlignment="Center" Checked="Rb_ColorsChecked"/>
118+
<RadioButton Name="rbC8_3" Content="Color 2" VerticalContentAlignment="Center" Checked="Rb_ColorsChecked"/>
119+
<RadioButton Name="rbC8_4" Content="Color 3" VerticalContentAlignment="Center" Checked="Rb_ColorsChecked"/>
120+
<RadioButton Name="rbC8_5" Content="Color 4" VerticalContentAlignment="Center" Checked="Rb_ColorsChecked"/>
121+
<RadioButton Name="rbC8_6" Content="Color 5" VerticalContentAlignment="Center" Checked="Rb_ColorsChecked"/>
122+
<RadioButton Name="rbC8_7" Content="Color 6" VerticalContentAlignment="Center" Checked="Rb_ColorsChecked"/>
123+
<RadioButton Name="rbC8_8" Content="Color 7" VerticalContentAlignment="Center" Checked="Rb_ColorsChecked"/>
124+
<RadioButton Name="rbC8_9" Content="Color 8" VerticalContentAlignment="Center" Checked="Rb_ColorsChecked"/>
125+
<RadioButton Name="rbC8_10" Content="Rainbow CW" VerticalContentAlignment="Center" Checked="Rb_ColorsChecked"/>
126+
<RadioButton Name="rbC8_11" Content="Rainbow CCW" VerticalContentAlignment="Center" Checked="Rb_ColorsChecked"/>
127+
</StackPanel>
128+
</ScrollViewer>
129+
</GroupBox>
130+
<GroupBox Header="Auto Programs" Margin="5">
131+
<ScrollViewer Height="172" VerticalScrollBarVisibility="Hidden">
132+
<StackPanel>
133+
<RadioButton Name="rbC11_2" Content="No function" VerticalContentAlignment="Center" Checked="Rb_ProgramsChecked"/>
134+
<RadioButton Name="rbC11_3" Content="Pan/tilt move:&#xA;blackout" VerticalContentAlignment="Center" Checked="Rb_ProgramsChecked"/>
135+
<RadioButton Name="rbC11_4" Content="Pan/tilt move:&#xA;no blackout" VerticalContentAlignment="Center" Checked="Rb_ProgramsChecked"/>
136+
<RadioButton Name="rbC11_5" Content="Color change:&#xA;blackout" VerticalContentAlignment="Center" Checked="Rb_ProgramsChecked"/>
137+
<RadioButton Name="rbC11_6" Content="Color change:&#xA;no blackout" VerticalContentAlignment="Center" Checked="Rb_ProgramsChecked"/>
138+
<RadioButton Name="rbC11_7" Content="Gobo change:&#xA;blackout" VerticalContentAlignment="Center" Checked="Rb_ProgramsChecked"/>
139+
<RadioButton Name="rbC11_8" Content="Gobo change:&#xA;no blackout" VerticalContentAlignment="Center" Checked="Rb_ProgramsChecked"/>
140+
<RadioButton Name="rbC11_9" Content="No function" VerticalContentAlignment="Center" Checked="Rb_ProgramsChecked"/>
141+
<RadioButton Name="rbC11_10" Content="Reset" VerticalContentAlignment="Center" Checked="Rb_ProgramsChecked"/>
142+
<RadioButton Name="rbC11_11" Content="No function" VerticalContentAlignment="Center" Checked="Rb_ProgramsChecked"/>
143+
<RadioButton Name="rbC11_12" Content="Stand-alone" VerticalContentAlignment="Center" Checked="Rb_ProgramsChecked"/>
144+
</StackPanel>
145+
</ScrollViewer>
146+
</GroupBox>
147+
</StackPanel>
148+
</StackPanel>
149+
</ScrollViewer>
13150
</Grid>
14151
</TabItem>
15152

0 commit comments

Comments
 (0)