Skip to content

Commit 10eb23d

Browse files
committed
250508.2
1 parent 8658e92 commit 10eb23d

File tree

5 files changed

+38
-72
lines changed

5 files changed

+38
-72
lines changed
Binary file not shown.

easycoder/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
from .ec_timestamp import *
1010
from .ec_value import *
1111

12-
__version__ = "250508.1"
12+
__version__ = "250508.2"

rbrconf.ecs

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,6 @@
160160
add Label to Layout
161161
create UptimeLabel text `0`
162162
add UptimeLabel to Layout
163-
create Label text `sec`
164-
add Label to Layout
165163
add stretch to Layout
166164

167165
create Layout type QHBoxLayout
@@ -896,7 +894,8 @@ PopulateSystemInfo:
896894
create MessageBox on Window
897895
style question
898896
title `Move system`
899-
message `Shall I move the system to the current host (` cat HostSSID cat `)?`
897+
message `Shall I move system ` cat SystemName cat ` to the current host (` cat HostSSID cat `)?` cat newline
898+
cat `(If 'No' I will attempt to connect to ` cat SystemHostSSID cat `)`
900899
show MessageBox giving Value
901900
if Value is `Yes`
902901
begin
@@ -1407,7 +1406,12 @@ CheckDevice:
14071406

14081407
CheckDevice2:
14091408
put the position of ` ` in Uptime into P
1410-
if P is greater than 0 put left P of Uptime into Uptime
1409+
if P is greater than 0
1410+
begin
1411+
put left P of Uptime into Uptime
1412+
put Uptime cat ` sec` into Uptime
1413+
end
1414+
else put `Unknown` into Uptime
14111415
log Name cat ` uptime: ` cat Uptime
14121416
set the text of UptimeLabel to Uptime
14131417
go to OK
@@ -1427,6 +1431,7 @@ RelayOffClick:
14271431
end
14281432
begin
14291433
put from 3 of Response into Uptime
1434+
put Uptime cat ` sec` into Uptime
14301435
set the text of RelayStateLabel to `OFF`
14311436
end
14321437
gosub to CheckDevice2
@@ -1448,6 +1453,7 @@ RelayOnClick:
14481453
else
14491454
begin
14501455
put from 3 of Response into Uptime
1456+
put Uptime cat ` sec` into Uptime
14511457
set the text of RelayStateLabel to `ON`
14521458
end
14531459
gosub to CheckDevice2
@@ -1496,6 +1502,7 @@ SendMessageToDevice:
14961502
put Path into MAC
14971503
end
14981504
end
1505+
put empty into Response
14991506
put `http://` cat MasterIPAddr cat `/?mac=` cat MAC cat `&msg=` cat Message2 into URL
15001507
! log URL
15011508
get Response from url URL
@@ -1508,7 +1515,6 @@ SendMessageToDevice:
15081515
set property `path` of Device to empty
15091516
go to SendMessageToDevice
15101517
end
1511-
put empty into Response
15121518
return
15131519
end
15141520
! log URL cat ` - ` cat Response
@@ -1559,13 +1565,23 @@ UpdateConfig:
15591565
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
15601566
! Pause the system controller
15611567
PauseSystemController:
1562-
if SystemIPAddr is not empty get Response from url `http://` cat SystemIPAddr cat `:17348/cgi-bin/pause.py`
1568+
if SystemIPAddr is not empty
1569+
get Response from url `http://` cat SystemIPAddr cat `:17348/cgi-bin/pause.py`
1570+
or begin
1571+
put `Unable to contact server at ` cat IPAddr into StatusMessage
1572+
goto Working
1573+
end
15631574
return
15641575

15651576
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1566-
! PaResumeuse the system controller
1577+
! Resume the system controller
15671578
ResumeSystemController:
1568-
if SystemIPAddr is not empty get Response from url `http://` cat SystemIPAddr cat `:17348/cgi-bin/resume.py`
1579+
if SystemIPAddr is not empty
1580+
get Response from url `http://` cat SystemIPAddr cat `:17348/cgi-bin/resume.py`
1581+
or begin
1582+
put `Unable to contact server at ` cat IPAddr into StatusMessage
1583+
goto Working
1584+
end
15691585
return
15701586

15711587
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

test.ecs

Lines changed: 13 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,13 @@
1-
script Benchmark
2-
3-
variable Start
4-
variable Finish
5-
variable N
6-
variable M
7-
variable Array
8-
variable Dictionary
9-
10-
! debug step
11-
12-
print `FOR loop counting to 500,000`
13-
put now into Start
14-
put 0 into N
15-
while N is less than 500000 increment N
16-
put now into Finish
17-
take Start from Finish giving N
18-
print N cat ` seconds`
19-
20-
print `Compare 500,000 long integers for equality`
21-
put now into Start
22-
put 0 into N
23-
while N is less than 500000
24-
begin
25-
if N is 1234567890 begin end
26-
increment N
27-
end
28-
put now into Finish
29-
take Start from Finish giving N
30-
print N cat ` seconds`
31-
32-
print `Allocate and initialize a 500,000 element array`
33-
put now into Start
34-
set the elements of Array to 500000
35-
put 0 into N
36-
while N is less than 500000
37-
begin
38-
index Array to N
39-
put N into Array
40-
increment N
41-
end
42-
put now into Finish
43-
take Start from Finish giving N
44-
print N cat ` seconds`
45-
46-
print `Allocate and initialize a 5000 element dictionary`
47-
put json `{}` into Dictionary
48-
put now into Start
49-
put 0 into N
50-
while N is less than 100
51-
begin
52-
put 0 into M
53-
while M is less than 50
54-
begin
55-
set property N cat ` ` cat M of Dictionary to M
56-
increment M
57-
end
58-
increment N
59-
end
60-
put now into Finish
61-
take Start from Finish giving N
62-
print N cat ` seconds`
63-
exit
1+
variable X
2+
variable Y
3+
variable Z
4+
5+
put 25 into X
6+
put 12 into Y
7+
multiply X by Y giving Z ! This form puts the result into the 3rd parameter
8+
print `The product of ` cat X cat ` multiplied by ` cat Y cat ` is ` cat Z
9+
put 123 into Y
10+
multiply X by Y ! This form replaces the 1st parameter with the product
11+
print `X is now ` cat X
12+
13+
exit

0 commit comments

Comments
 (0)