Skip to content

Commit 1e9dde5

Browse files
committed
250422.1
1 parent 48e574d commit 1e9dde5

File tree

9 files changed

+444
-30
lines changed

9 files changed

+444
-30
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*/__pycache__/*

config.ecs

Lines changed: 221 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,221 @@
1+
! config.ecs
2+
3+
script Configurator
4+
5+
use graphics
6+
7+
window Window
8+
layout MainPanel
9+
layout LeftPanel
10+
layout RightPanel
11+
layout OuterLayout
12+
layout Layout
13+
groupbox Group
14+
label Label
15+
label MasterDeviceLabel
16+
pushbutton ResetConfigButton
17+
pushbutton ScanNetworkButton
18+
pushbutton SelectMasterButton
19+
pushbutton SelectSlaveButton
20+
pushbutton DeleteSlaveButton
21+
pushbutton UpdateSlaveButton
22+
pushbutton DeleteFileButton
23+
pushbutton ExitButton
24+
pushbutton SelectSystemButton
25+
lineinput SSIDInput
26+
lineinput PasswordInput
27+
lineinput DeviceNameInput
28+
lineinput ChannelInput
29+
lineinput LEDPinInput
30+
lineinput RelayPinInput
31+
lineinput DHT22PinInput
32+
lineinput PathInput
33+
listbox SlaveList
34+
35+
! debug step
36+
37+
log `Starting`
38+
init graphics
39+
create Window title `RBR-Now configurator` size 600 500
40+
create MainPanel type QHBoxLayout
41+
42+
create LeftPanel type QVBoxLayout
43+
add LeftPanel to MainPanel
44+
create ResetConfigButton text `Reset config`
45+
on click ResetConfigButton go to ResetConfigFile
46+
add ResetConfigButton to LeftPanel
47+
48+
create ScanNetworkButton text `Scan network`
49+
on click ScanNetworkButton go to ScanNetwork
50+
add ScanNetworkButton to LeftPanel
51+
52+
create SelectMasterButton text `Select master`
53+
on click SelectMasterButton go to SelectMaster
54+
add SelectMasterButton to LeftPanel
55+
56+
create SelectSlaveButton text `Select slave`
57+
on click SelectSlaveButton go to SelectSlave
58+
add SelectSlaveButton to LeftPanel
59+
60+
create UpdateSlaveButton text `Update slave`
61+
on click UpdateSlaveButton go to UpdateSlave
62+
add UpdateSlaveButton to LeftPanel
63+
64+
create DeleteFileButton text `Delete file`
65+
add DeleteFileButton to LeftPanel
66+
on click DeleteFileButton go to DeleteFile
67+
68+
create DeleteSlaveButton text `Delete slave`
69+
add DeleteSlaveButton to LeftPanel
70+
on click DeleteSlaveButton go to DeleteSlave
71+
72+
create ExitButton text `Exit`
73+
add ExitButton to LeftPanel
74+
on click ExitButton go to Exit
75+
76+
add stretch to LeftPanel
77+
78+
create RightPanel type QVBoxLayout
79+
add stretch RightPanel to MainPanel
80+
81+
! Create the system name group
82+
create Group title `System name`
83+
set the height of Group to 50
84+
add Group to RightPanel
85+
create Layout type QHBoxLayout
86+
add Layout to Group
87+
create Label text `(none)`
88+
add stretch Label to Layout
89+
create SelectSystemButton text `Select system`
90+
on click SelectSystemButton go to SelectSystem
91+
add SelectSystemButton to Layout
92+
93+
! Create the host access group
94+
create Group title `Host`
95+
set the height of Group to 50
96+
add Group to RightPanel
97+
create Layout type QHBoxLayout
98+
add Layout to Group
99+
create Label text `SSID:`
100+
add Label to Layout
101+
create SSIDInput size 40
102+
add SSIDInput to Layout
103+
create Label text `Password:`
104+
add Label to Layout
105+
create PasswordInput size 40
106+
add PasswordInput to Layout
107+
108+
! Create the Master Device group
109+
create Group title `Master device`
110+
set the height of Group to 50
111+
add Group to RightPanel
112+
create Layout type QHBoxLayout
113+
add Layout to Group
114+
create MasterDeviceLabel text `(none)`
115+
add MasterDeviceLabel to Layout
116+
117+
! Create the Slave Devices group
118+
create Group title `Slave devices`
119+
set the height of Group to 150
120+
add Group to RightPanel
121+
create Layout type QHBoxLayout
122+
add Layout to Group
123+
create SlaveList
124+
add SlaveList to Layout
125+
126+
! Create the Selected Devices group
127+
create Group title `Selected device`
128+
set the height of Group to 150
129+
add Group to RightPanel
130+
131+
create OuterLayout type QVBoxLayout
132+
add OuterLayout to Group
133+
134+
create Layout type QHBoxLayout
135+
add Layout to OuterLayout
136+
create Label text `Name:`
137+
add Label to Layout
138+
create DeviceNameInput size 40
139+
add DeviceNameInput to Layout
140+
create Label text `Channel:`
141+
add Label to Layout
142+
create ChannelInput size 5
143+
add ChannelInput to Layout
144+
add stretch to Layout
145+
146+
create Layout type QHBoxLayout
147+
add Layout to OuterLayout
148+
create Label text `LED Pin:`
149+
add Label to Layout
150+
create LEDPinInput size 5
151+
add LEDPinInput to Layout
152+
add stretch to Layout
153+
154+
create Layout type QHBoxLayout
155+
add Layout to OuterLayout
156+
create Label text `Relay Pin:`
157+
add Label to Layout
158+
create RelayPinInput size 5
159+
add RelayPinInput to Layout
160+
add stretch to Layout
161+
162+
create Layout type QHBoxLayout
163+
add Layout to OuterLayout
164+
create Label text `DHT22 Pin:`
165+
add Label to Layout
166+
create DHT22PinInput size 5
167+
add DHT22PinInput to Layout
168+
add stretch to Layout
169+
170+
create Layout type QHBoxLayout
171+
add Layout to OuterLayout
172+
create Label text `Path:`
173+
add Label to Layout
174+
create PathInput size 60
175+
add PathInput to Layout
176+
add stretch to Layout
177+
178+
add stretch to RightPanel
179+
180+
show MainPanel in Window
181+
182+
start graphics
183+
log `Graphics running`
184+
stop
185+
186+
ResetConfigFile:
187+
log `Reset the configuration file`
188+
stop
189+
190+
ScanNetwork:
191+
log `Scan the network`
192+
stop
193+
194+
SelectMaster:
195+
log `Select the master device`
196+
stop
197+
198+
SelectSlave:
199+
log `Select a slave device`
200+
stop
201+
202+
UpdateSlave:
203+
log `Update the files om the selected device`
204+
stop
205+
206+
DeleteFile:
207+
log `Delete a file on the selected device`
208+
stop
209+
210+
DeleteSlave:
211+
log `Delete the selected slave device`
212+
stop
213+
214+
Exit:
215+
log `Exit the configuator`
216+
close Window
217+
exit
218+
219+
SelectSystem:
220+
log `Select the system`
221+
stop

config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from easycoder import Program
2+
3+
Program('config.ecs').start()
35.6 KB
Binary file not shown.

dist/easycoder-250421.2.tar.gz

3.1 MB
Binary file not shown.

0 commit comments

Comments
 (0)