easycoder 250505.3__tar.gz → 250507.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of easycoder might be problematic. Click here for more details.
- {easycoder-250505.3 → easycoder-250507.1}/PKG-INFO +3 -2
- {easycoder-250505.3 → easycoder-250507.1}/easycoder/__init__.py +1 -1
- {easycoder-250505.3 → easycoder-250507.1}/easycoder/ec_classes.py +8 -0
- {easycoder-250505.3 → easycoder-250507.1}/easycoder/ec_core.py +15 -15
- {easycoder-250505.3 → easycoder-250507.1}/easycoder/ec_program.py +1 -0
- {easycoder-250505.3 → easycoder-250507.1}/easycoder/ec_pyside.py +2 -3
- easycoder-250505.3/config.ecs → easycoder-250507.1/rbrconf.ecs +91 -58
- easycoder-250505.3/config.py → easycoder-250507.1/rbrconf.py +1 -1
- easycoder-250505.3/demo.ecs +0 -34
- easycoder-250505.3/group.py +0 -36
- easycoder-250505.3/temp.ecs +0 -1356
- easycoder-250505.3/test.ecs +0 -11
- easycoder-250505.3/test.py +0 -3
- {easycoder-250505.3 → easycoder-250507.1}/.gitignore +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/LICENSE +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/README.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/README.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/README.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/conditions/boolean.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/conditions/empty.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/conditions/ends.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/conditions/even.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/conditions/exists.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/conditions/greater.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/conditions/hasProperty.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/conditions/includes.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/conditions/is.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/conditions/less.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/conditions/list.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/conditions/none.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/conditions/not.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/conditions/numeric.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/conditions/object.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/conditions/odd.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/conditions/starts.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/conditions/string.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/add.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/append.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/assert.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/begin.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/clear.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/close.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/create.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/debug.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/decrement.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/delete.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/divide.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/exit.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/file.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/fork.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/get.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/go.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/gosub.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/if.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/import.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/increment.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/index.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/init.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/input.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/load.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/lock.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/log.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/module.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/multiply.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/negate.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/open.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/pop.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/post.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/print.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/push.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/put.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/read.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/release.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/replace.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/return.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/run.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/save.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/script.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/set.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/split.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/stack.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/stop.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/system.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/take.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/toggle.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/truncate.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/unlock.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/variable.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/wait.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/while.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/keywords/write.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/arg.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/args.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/cos.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/datime.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/decode.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/element.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/elements.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/empty.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/encode.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/error.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/files.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/float.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/from.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/hash.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/index.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/integer.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/json.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/keys.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/left.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/length.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/lowercase.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/memory.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/modification.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/modulo.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/newline.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/now.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/position.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/property.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/random.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/right.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/sin.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/stringify.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/tab.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/tan.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/timestamp.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/today.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/trim.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/type.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/uppercase.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/value.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/core/values/weekday.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/graphics/README.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/graphics/keywords/attach.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/graphics/keywords/close.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/graphics/keywords/create.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/graphics/keywords/ellipse.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/graphics/keywords/image.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/graphics/keywords/move.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/graphics/keywords/on.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/graphics/keywords/rectangle.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/graphics/keywords/render.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/graphics/keywords/run.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/graphics/keywords/set.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/graphics/keywords/text.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/graphics/values/attribute.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/doc/graphics/values/window.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/easycoder/README.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/easycoder/ec_compiler.py +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/easycoder/ec_condition.py +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/easycoder/ec_graphics.py +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/easycoder/ec_gutils.py +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/easycoder/ec_handler.py +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/easycoder/ec_timestamp.py +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/easycoder/ec_value.py +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/images/Semoigo Dawn.jpg +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/json/graphics-demo.json +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/plugins/ec_keyboard.py +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/plugins/ec_p100.py +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/plugins/ec_pyside6.py +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/plugins/keyboards/4-function.json +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/plugins/keyboards/4-function.png +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/plugins/keyboards/qwerty-0.json +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/plugins/keyboards/qwerty-0.png +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/plugins/keyboards/qwerty-1.json +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/plugins/keyboards/qwerty-1.png +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/plugins/keyboards/qwerty-2.json +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/plugins/keyboards/qwerty-2.png +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/plugins/keyboards/qwerty-3.json +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/plugins/keyboards/qwerty-3.png +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/plugins/points.py +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/pyproject.toml +0 -0
- /easycoder-250505.3/q.py → /easycoder-250507.1/q1.py +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/q2.py +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/scripts/README.md +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/scripts/benchmark.ecs +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/scripts/config.ecg +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/scripts/connect.ecg +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/scripts/ec_keyboard.py +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/scripts/findxr.ecs +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/scripts/fizzbuzz.ecs +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/scripts/hello.ecs +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/scripts/points.ecs +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/scripts/test.ecs +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/scripts/testg.ecg +0 -0
- {easycoder-250505.3 → easycoder-250507.1}/scripts/tests.ecs +0 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: easycoder
|
|
3
|
-
Version:
|
|
3
|
+
Version: 250507.1
|
|
4
4
|
Summary: Rapid scripting in English
|
|
5
5
|
Keywords: compiler,scripting,prototyping,programming,coding,python,low code,hypertalk,computer language,learn to code
|
|
6
6
|
Author-email: Graham Trott <gtanyware@gmail.com>
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
8
|
Classifier: License :: OSI Approved :: MIT License
|
|
9
|
+
License-File: LICENSE
|
|
9
10
|
Requires-Dist: pytz
|
|
10
11
|
Requires-Dist: pyside6
|
|
11
12
|
Project-URL: Home, https://github.com/easycoder/easycoder-py
|
|
@@ -8,6 +8,10 @@ class FatalError:
|
|
|
8
8
|
print(f'Compile error in {compiler.program.name} at line {lino + 1} ({script}): {message}')
|
|
9
9
|
sys.exit()
|
|
10
10
|
|
|
11
|
+
class NoValueError(FatalError):
|
|
12
|
+
def __init__(self, compiler, record):
|
|
13
|
+
super().__init__(compiler, 'Variable {record["name"]} does not hold a value')
|
|
14
|
+
|
|
11
15
|
class AssertionError:
|
|
12
16
|
def __init__(self, program, msg=None):
|
|
13
17
|
code = program.code[program.pc]
|
|
@@ -30,6 +34,10 @@ class RuntimeError:
|
|
|
30
34
|
print(f'Runtime Error in {program.name} at line {lino + 1} ({script}): {message}')
|
|
31
35
|
sys.exit()
|
|
32
36
|
|
|
37
|
+
class NoValueRuntimeError(RuntimeError):
|
|
38
|
+
def __init__(self, program, record):
|
|
39
|
+
super().__init__(program, 'Variable {record["name"]} does not hold a value')
|
|
40
|
+
|
|
33
41
|
class RuntimeWarning:
|
|
34
42
|
def __init__(self, program, message):
|
|
35
43
|
if program == None:
|
|
@@ -2,7 +2,7 @@ import json, math, hashlib, threading, os, subprocess, sys, requests, time, numb
|
|
|
2
2
|
from psutil import Process
|
|
3
3
|
from datetime import datetime, timezone
|
|
4
4
|
from random import randrange
|
|
5
|
-
from .ec_classes import FatalError, RuntimeWarning, RuntimeError, AssertionError, Condition, Object
|
|
5
|
+
from .ec_classes import FatalError, RuntimeWarning, RuntimeError, AssertionError, NoValueError, NoValueRuntimeError, Condition, Object
|
|
6
6
|
from .ec_handler import Handler
|
|
7
7
|
from .ec_timestamp import getTimestamp
|
|
8
8
|
|
|
@@ -94,7 +94,7 @@ class Core(Handler):
|
|
|
94
94
|
command['target'] = symbolRecord['name']
|
|
95
95
|
self.add(command)
|
|
96
96
|
return True
|
|
97
|
-
self.warning(f'Core.append: Variable
|
|
97
|
+
self.warning(f'Core.append: Variable {symbolRecord["name"]} does not hold a value')
|
|
98
98
|
return False
|
|
99
99
|
|
|
100
100
|
def r_append(self, command):
|
|
@@ -251,7 +251,7 @@ class Core(Handler):
|
|
|
251
251
|
command['target'] = self.getToken()
|
|
252
252
|
self.add(command)
|
|
253
253
|
return True
|
|
254
|
-
self.warning(f'Core.decrement: Variable
|
|
254
|
+
self.warning(f'Core.decrement: Variable {symbolRecord["name"]} does not hold a value')
|
|
255
255
|
return False
|
|
256
256
|
|
|
257
257
|
def r_decrement(self, command):
|
|
@@ -277,7 +277,7 @@ class Core(Handler):
|
|
|
277
277
|
command['var'] = record['name']
|
|
278
278
|
self.add(command)
|
|
279
279
|
return True
|
|
280
|
-
|
|
280
|
+
NoValueError(self.compiler, record)
|
|
281
281
|
self.warning(f'Core.delete: variable expected; got {self.getToken()}')
|
|
282
282
|
else:
|
|
283
283
|
self.warning(f'Core.delete: "file", "property" or "element" expected; got {token}')
|
|
@@ -418,7 +418,7 @@ class Core(Handler):
|
|
|
418
418
|
if symbolRecord['hasValue']:
|
|
419
419
|
command['target'] = self.getToken()
|
|
420
420
|
else:
|
|
421
|
-
|
|
421
|
+
NoValueError(self.compiler, symbolRecord)
|
|
422
422
|
if self.nextIs('from'):
|
|
423
423
|
if self.nextIs('url'):
|
|
424
424
|
url = self.nextValue()
|
|
@@ -629,7 +629,7 @@ class Core(Handler):
|
|
|
629
629
|
command['target'] = self.getToken()
|
|
630
630
|
self.add(command)
|
|
631
631
|
return True
|
|
632
|
-
self.warning(f'Core.increment: Variable
|
|
632
|
+
self.warning(f'Core.increment: Variable {symbolRecord["name"]} does not hold a value')
|
|
633
633
|
return False
|
|
634
634
|
|
|
635
635
|
def r_increment(self, command):
|
|
@@ -829,13 +829,13 @@ class Core(Handler):
|
|
|
829
829
|
command['target'] = self.getToken()
|
|
830
830
|
self.add(command)
|
|
831
831
|
return True
|
|
832
|
-
self.warning(f'Core.negate: Variable
|
|
832
|
+
self.warning(f'Core.negate: Variable {symbolRecord["name"]} does not hold a value')
|
|
833
833
|
return False
|
|
834
834
|
|
|
835
835
|
def r_negate(self, command):
|
|
836
836
|
symbolRecord = self.getVariable(command['target'])
|
|
837
837
|
if not symbolRecord['hasValue']:
|
|
838
|
-
|
|
838
|
+
NoValueRuntimeError(self.program, symbolRecord)
|
|
839
839
|
return None
|
|
840
840
|
value = self.getSymbolValue(symbolRecord)
|
|
841
841
|
if value == None:
|
|
@@ -937,7 +937,7 @@ class Core(Handler):
|
|
|
937
937
|
def r_pop(self, command):
|
|
938
938
|
symbolRecord = self.getVariable(command['target'])
|
|
939
939
|
if not symbolRecord['hasValue']:
|
|
940
|
-
|
|
940
|
+
NoValueRuntimeError(self.program, symbolRecord)
|
|
941
941
|
stackRecord = self.getVariable(command['from'])
|
|
942
942
|
stack = self.getSymbolValue(stackRecord)
|
|
943
943
|
v = stack.pop()
|
|
@@ -1091,7 +1091,7 @@ class Core(Handler):
|
|
|
1091
1091
|
return -1
|
|
1092
1092
|
symbolRecord = self.getVariable(command['target'])
|
|
1093
1093
|
if not symbolRecord['hasValue']:
|
|
1094
|
-
|
|
1094
|
+
NoValueRuntimeError(self.program, symbolRecord)
|
|
1095
1095
|
return -1
|
|
1096
1096
|
self.putSymbolValue(symbolRecord, value)
|
|
1097
1097
|
return self.nextPC()
|
|
@@ -1406,13 +1406,13 @@ class Core(Handler):
|
|
|
1406
1406
|
command['target'] = self.getToken()
|
|
1407
1407
|
self.add(command)
|
|
1408
1408
|
return True
|
|
1409
|
-
self.warning(f'Core.negate: Variable
|
|
1409
|
+
self.warning(f'Core.negate: Variable {symbolRecord["name"]} does not hold a value')
|
|
1410
1410
|
return False
|
|
1411
1411
|
|
|
1412
1412
|
def r_shuffle(self, command):
|
|
1413
1413
|
symbolRecord = self.getVariable(command['target'])
|
|
1414
1414
|
if not symbolRecord['hasValue']:
|
|
1415
|
-
|
|
1415
|
+
NoValueRuntimeError(self.program, symbolRecord)
|
|
1416
1416
|
return None
|
|
1417
1417
|
value = self.getSymbolValue(symbolRecord)
|
|
1418
1418
|
if value == None:
|
|
@@ -1735,7 +1735,7 @@ class Core(Handler):
|
|
|
1735
1735
|
def incdec(self, command, mode):
|
|
1736
1736
|
symbolRecord = self.getVariable(command['target'])
|
|
1737
1737
|
if not symbolRecord['hasValue']:
|
|
1738
|
-
|
|
1738
|
+
NoValueRuntimeError(self.program, symbolRecord)
|
|
1739
1739
|
value = self.getSymbolValue(symbolRecord)
|
|
1740
1740
|
if value == None:
|
|
1741
1741
|
RuntimeError(self.program, f'{symbolRecord["name"]} has not been initialised')
|
|
@@ -1805,7 +1805,7 @@ class Core(Handler):
|
|
|
1805
1805
|
if symbolRecord['hasValue']:
|
|
1806
1806
|
value['target'] = symbolRecord['name']
|
|
1807
1807
|
return value
|
|
1808
|
-
self.warning(f'Core.compileValue: Token
|
|
1808
|
+
self.warning(f'Core.compileValue: Token {symbolRecord["name"]} does not hold a value')
|
|
1809
1809
|
return None
|
|
1810
1810
|
|
|
1811
1811
|
if token == 'property':
|
|
@@ -1816,7 +1816,7 @@ class Core(Handler):
|
|
|
1816
1816
|
if symbolRecord['hasValue']:
|
|
1817
1817
|
value['target'] = symbolRecord['name']
|
|
1818
1818
|
return value
|
|
1819
|
-
|
|
1819
|
+
NoValueError(self.compiler, symbolRecord)
|
|
1820
1820
|
return None
|
|
1821
1821
|
|
|
1822
1822
|
if token == 'arg':
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import sys
|
|
2
|
-
from easycoder import Handler,
|
|
2
|
+
from easycoder import Handler, RuntimeError
|
|
3
3
|
from PySide6.QtCore import Qt, QTimer
|
|
4
4
|
from PySide6.QtGui import QPixmap
|
|
5
5
|
from PySide6.QtWidgets import (
|
|
@@ -690,7 +690,7 @@ class Graphics(Handler):
|
|
|
690
690
|
command['index'] = self.nextValue()
|
|
691
691
|
self.skip('of')
|
|
692
692
|
else:
|
|
693
|
-
command['name'] = self.
|
|
693
|
+
command['name'] = self.getValue()
|
|
694
694
|
self.skip('in')
|
|
695
695
|
if self.nextIsSymbol():
|
|
696
696
|
record = self.getSymbolRecord()
|
|
@@ -878,7 +878,6 @@ class Graphics(Handler):
|
|
|
878
878
|
|
|
879
879
|
def r_start(self, command):
|
|
880
880
|
def on_last_window_closed():
|
|
881
|
-
print("Kill the appication...")
|
|
882
881
|
self.program.kill()
|
|
883
882
|
def resume():
|
|
884
883
|
self.program.flush(self.nextPC())
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
!
|
|
1
|
+
! rbrconf.ecs
|
|
2
2
|
|
|
3
|
-
script
|
|
3
|
+
script RBRConfigurator
|
|
4
4
|
|
|
5
5
|
use graphics
|
|
6
6
|
|
|
@@ -109,7 +109,6 @@
|
|
|
109
109
|
create Layout type QHBoxLayout
|
|
110
110
|
add Layout to Group
|
|
111
111
|
create SystemsCombo
|
|
112
|
-
on select SystemsCombo go to SystemsComboSelect
|
|
113
112
|
add stretch SystemsCombo to Layout
|
|
114
113
|
create ScanSystemsButton text `System Scan`
|
|
115
114
|
disable ScanSystemsButton
|
|
@@ -294,6 +293,7 @@
|
|
|
294
293
|
variable Pin
|
|
295
294
|
variable D
|
|
296
295
|
variable F
|
|
296
|
+
variable K
|
|
297
297
|
variable N
|
|
298
298
|
variable P
|
|
299
299
|
variable S
|
|
@@ -319,6 +319,8 @@ Start:
|
|
|
319
319
|
put empty into SystemIPAddr
|
|
320
320
|
clear DeviceSelected
|
|
321
321
|
|
|
322
|
+
gosub to SetBusy
|
|
323
|
+
|
|
322
324
|
! Get the host SSID
|
|
323
325
|
put `Getting host SSID...` into StatusMessage
|
|
324
326
|
gosub to Working
|
|
@@ -352,17 +354,17 @@ Start:
|
|
|
352
354
|
if the count of SystemsCombo is 0 put empty into SystemName
|
|
353
355
|
else
|
|
354
356
|
begin
|
|
355
|
-
put
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
enable ClearSystemButton
|
|
357
|
+
put property `current-system` of Config into SystemName
|
|
358
|
+
if SystemName is not empty
|
|
359
|
+
begin
|
|
360
|
+
select SystemName in SystemsCombo
|
|
361
|
+
! log prettify SystemConfig
|
|
362
|
+
gosub to SelectSystem
|
|
363
|
+
end
|
|
363
364
|
end
|
|
364
365
|
|
|
365
366
|
gosub to ManageButtonStates
|
|
367
|
+
on select SystemsCombo go to SystemsComboSelect
|
|
366
368
|
stop
|
|
367
369
|
|
|
368
370
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
@@ -403,13 +405,13 @@ ScanSystemsClick:
|
|
|
403
405
|
stop
|
|
404
406
|
|
|
405
407
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
406
|
-
! Scan the network for RBR system controllers
|
|
408
|
+
! Scan the local network for RBR system controllers
|
|
407
409
|
ScanSystems:
|
|
408
410
|
log `Scan systems`
|
|
409
411
|
put trim system `hostname -I` into MyIPAddr
|
|
410
412
|
log MyIPAddr
|
|
411
|
-
put
|
|
412
|
-
while N is less than
|
|
413
|
+
put 1 into N
|
|
414
|
+
while N is less than 255
|
|
413
415
|
begin
|
|
414
416
|
put the position of the last `.` in MyIPAddr into P
|
|
415
417
|
increment P
|
|
@@ -420,7 +422,6 @@ ScanSystems:
|
|
|
420
422
|
get Result from url `http://` cat IPAddr cat `:17348/cgi-bin/mac.py` timeout 1 or go to SS2
|
|
421
423
|
increment Count
|
|
422
424
|
put trim Result into Result
|
|
423
|
-
log Result
|
|
424
425
|
log IPAddr cat `: ` cat Result
|
|
425
426
|
put the position of ` ` in Result into P
|
|
426
427
|
put left P of Result into SystemMAC
|
|
@@ -438,15 +439,17 @@ ScanSystems:
|
|
|
438
439
|
set property `password` of SystemConfig to SystemPassword
|
|
439
440
|
set property `devices` of SystemConfig to json `{}`
|
|
440
441
|
log `Adding ` cat SystemName cat ` to Systems`
|
|
441
|
-
gosub UpdateSystems
|
|
442
|
-
log prettify SystemConfig
|
|
443
442
|
gosub to GetConfigData
|
|
443
|
+
! log prettify SystemConfig
|
|
444
|
+
set property SystemName of Systems to SystemConfig
|
|
444
445
|
SS2:
|
|
445
446
|
wait 10 ticks
|
|
446
447
|
increment N
|
|
447
448
|
end
|
|
448
449
|
set property `current-system` of Config to SystemName
|
|
449
|
-
|
|
450
|
+
gosub to UpdateSystems
|
|
451
|
+
! log `After scan: ` cat prettify Config
|
|
452
|
+
gosub to PostConfigData
|
|
450
453
|
go to OK
|
|
451
454
|
|
|
452
455
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
@@ -454,8 +457,8 @@ ScanSystems:
|
|
|
454
457
|
GetConfigData:
|
|
455
458
|
gosub to SetBusy
|
|
456
459
|
if SystemName is empty return
|
|
460
|
+
log prettify SystemConfig
|
|
457
461
|
log `Get the config data for ` cat SystemName
|
|
458
|
-
put property `devices` of SystemConfig into Devices
|
|
459
462
|
get Value from url `https://rbrheating.com/ui/resources/php/rest.php/config/`
|
|
460
463
|
cat SystemMAC cat `/` cat SystemPassword
|
|
461
464
|
or
|
|
@@ -463,16 +466,30 @@ GetConfigData:
|
|
|
463
466
|
put `Can't read the config file for ` cat SystemName cat `(` cat MAC cat `/` cat Password cat `)` into StatusMessage
|
|
464
467
|
go to Error
|
|
465
468
|
end
|
|
466
|
-
|
|
469
|
+
log Value
|
|
470
|
+
! If the server has data, copy it into the local config
|
|
471
|
+
if Value is `""` put empty into Value
|
|
467
472
|
if Value is empty put `{}` into Value
|
|
468
473
|
if Value is not `{}`
|
|
469
474
|
begin
|
|
470
|
-
log `
|
|
471
|
-
put json Value into
|
|
472
|
-
|
|
475
|
+
log `Add config data from the server`
|
|
476
|
+
put json Value into Value
|
|
477
|
+
log prettify Value
|
|
478
|
+
put the keys of Value into Keys
|
|
479
|
+
put 0 into K
|
|
480
|
+
while K is less than the count of Keys
|
|
481
|
+
begin
|
|
482
|
+
put element K of Keys into Name
|
|
483
|
+
log `Adding ` cat Name cat ` ` cat property Name of Value
|
|
484
|
+
! if Name is `ssid` set property `host-ssid` of SystemConfig to property Name of Value
|
|
485
|
+
! else if Name is `password` set property `host-password` of SystemConfig to property Name of Value
|
|
486
|
+
! else
|
|
487
|
+
set property Name of SystemConfig to property Name of Value
|
|
488
|
+
increment K
|
|
489
|
+
end
|
|
473
490
|
end
|
|
474
|
-
|
|
475
|
-
|
|
491
|
+
gosub to UpdateSystems
|
|
492
|
+
put property `devices` of SystemConfig into Devices
|
|
476
493
|
return
|
|
477
494
|
|
|
478
495
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
@@ -496,19 +513,25 @@ RefreshSystemsCombo:
|
|
|
496
513
|
SystemsComboSelect:
|
|
497
514
|
gosub to ResumeSystemController
|
|
498
515
|
put SystemsCombo into SystemName
|
|
499
|
-
if SystemName is not empty
|
|
500
|
-
begin
|
|
501
|
-
log `Select system ` cat SystemName
|
|
502
|
-
set property `current-system` of Config to SystemName
|
|
503
|
-
put property SystemName of Systems into SystemConfig
|
|
504
|
-
put property `ipaddr` of SystemConfig into SystemIPAddr
|
|
505
|
-
gosub to PopulateSystemInfo
|
|
506
|
-
gosub to PauseSystemController
|
|
507
|
-
end
|
|
516
|
+
if SystemName is not empty gosub to SelectSystem
|
|
508
517
|
gosub to ManageButtonStates
|
|
509
518
|
if not ErrorFlag gosub to OK
|
|
510
519
|
stop
|
|
511
520
|
|
|
521
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
522
|
+
! Select a system
|
|
523
|
+
SelectSystem:
|
|
524
|
+
log `Select system ` cat SystemName
|
|
525
|
+
set property `current-system` of Config to SystemName
|
|
526
|
+
put property SystemName of Systems into SystemConfig
|
|
527
|
+
put property `ipaddr` of SystemConfig into SystemIPAddr
|
|
528
|
+
put property `mac` of SystemConfig into SystemMAC
|
|
529
|
+
put property `password` of SystemConfig into SystemPassword
|
|
530
|
+
gosub to PopulateSystemInfo
|
|
531
|
+
gosub to PostConfigData
|
|
532
|
+
gosub to PauseSystemController
|
|
533
|
+
return
|
|
534
|
+
|
|
512
535
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
513
536
|
! Remove a system from the combo box
|
|
514
537
|
RemoveSystemClick:
|
|
@@ -525,6 +548,9 @@ RemoveSystemClick:
|
|
|
525
548
|
remove the current item from SystemsCombo
|
|
526
549
|
delete property SystemName of Systems
|
|
527
550
|
put empty into SystemName
|
|
551
|
+
put empty into SystemConfig
|
|
552
|
+
set the text of MasterDeviceButton to empty
|
|
553
|
+
clear SlaveList
|
|
528
554
|
set property `current-system` of Config to SystemsCombo
|
|
529
555
|
set property `systems` of Config to Systems
|
|
530
556
|
put empty into SystemHostSSID
|
|
@@ -583,7 +609,7 @@ CheckFirmware2:
|
|
|
583
609
|
save prettify Config to ConfigFile
|
|
584
610
|
go to OK
|
|
585
611
|
end
|
|
586
|
-
put `Firmware directory is missing` into StatusMessage
|
|
612
|
+
put `Firmware directory is missing or unspecified` into StatusMessage
|
|
587
613
|
gosub to Error
|
|
588
614
|
gosub to GetFirmware
|
|
589
615
|
CheckFirmware3:
|
|
@@ -862,26 +888,33 @@ CreateDevice:
|
|
|
862
888
|
PopulateSystemInfo:
|
|
863
889
|
log `Populate fields for ` cat SystemName
|
|
864
890
|
put property `host-ssid` of SystemConfig into SystemHostSSID
|
|
891
|
+
put property `host-password` of SystemConfig into Password
|
|
865
892
|
if SystemHostSSID is not HostSSID
|
|
866
893
|
begin
|
|
867
|
-
put
|
|
868
|
-
put `Connect to host ` cat SystemHostSSID cat ` with password ` cat Password into StatusMessage
|
|
894
|
+
put `Unknown host SSID ` cat SystemHostSSID into StatusMessage
|
|
869
895
|
gosub to Working
|
|
870
|
-
put
|
|
896
|
+
put SystemHostSSID into HostSSID
|
|
897
|
+
put Password into HostPassword
|
|
898
|
+
put system `nmcli dev wifi connect ` cat HostSSID cat ` password ` cat HostPassword into SystemCallResult
|
|
871
899
|
split SystemCallResult on ` `
|
|
872
900
|
if the elements of SystemCallResult is greater than 2
|
|
873
901
|
begin
|
|
874
902
|
index SystemCallResult to 2
|
|
875
903
|
if SystemCallResult is `successfully`
|
|
876
904
|
begin
|
|
877
|
-
|
|
905
|
+
set property HostSSID of Hosts to HostPassword
|
|
906
|
+
set property `hosts` of Config to Hosts
|
|
907
|
+
gosub to PostConfigData
|
|
878
908
|
put HostSSID into CurrentSSID
|
|
879
909
|
put `Connected to ` cat HostSSID into StatusMessage
|
|
880
|
-
|
|
910
|
+
gosub to Working
|
|
911
|
+
end
|
|
912
|
+
else
|
|
913
|
+
begin
|
|
914
|
+
put `Failed to connect to ` cat HostSSID into StatusMessage
|
|
915
|
+
go to Error
|
|
881
916
|
end
|
|
882
917
|
end
|
|
883
|
-
put `Failed to connect to ` cat HostSSID into StatusMessage
|
|
884
|
-
go to Error
|
|
885
918
|
end
|
|
886
919
|
put property `mac` of SystemConfig into SystemMAC
|
|
887
920
|
put property `password` of SystemConfig into SystemPassword
|
|
@@ -930,7 +963,6 @@ MasterDeviceClick:
|
|
|
930
963
|
set DeviceSelected
|
|
931
964
|
set IsMaster
|
|
932
965
|
put MasterDevice into Device
|
|
933
|
-
log prettify Device
|
|
934
966
|
gosub to PopulateDeviceInfo
|
|
935
967
|
end
|
|
936
968
|
gosub to ManageButtonStates
|
|
@@ -960,7 +992,7 @@ PopulateDeviceInfo:
|
|
|
960
992
|
enable UpdateFilesButton
|
|
961
993
|
enable DeleteFileButton
|
|
962
994
|
end
|
|
963
|
-
|
|
995
|
+
go to OK
|
|
964
996
|
|
|
965
997
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
966
998
|
! Show information about a slave device
|
|
@@ -1193,10 +1225,9 @@ UpdateWidgetDataClick:
|
|
|
1193
1225
|
UpdateFilesClick:
|
|
1194
1226
|
if not DeviceSelected stop
|
|
1195
1227
|
put property `ssid` of Device into SSID
|
|
1196
|
-
split SSID on ` `
|
|
1197
1228
|
put from 8 of SSID into MAC
|
|
1198
1229
|
|
|
1199
|
-
put FirmwareDirectory cat
|
|
1230
|
+
put FirmwareDirectory cat `/files.txt` into Path
|
|
1200
1231
|
load Files from Path
|
|
1201
1232
|
split Files
|
|
1202
1233
|
put 0 into F
|
|
@@ -1222,7 +1253,7 @@ UpdateFilesClick:
|
|
|
1222
1253
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
1223
1254
|
! Update a single file
|
|
1224
1255
|
UpdateOneFile:
|
|
1225
|
-
put FirmwareDirectory cat FileName into Path
|
|
1256
|
+
put FirmwareDirectory cat `/` cat FileName into Path
|
|
1226
1257
|
if file Path exists begin end
|
|
1227
1258
|
else
|
|
1228
1259
|
begin
|
|
@@ -1252,7 +1283,7 @@ SendFileToDevice:
|
|
|
1252
1283
|
put the length of Content into FileSize
|
|
1253
1284
|
put `Update device file ` cat FileName cat ` (size=` cat FileSize cat ` chars)` into StatusMessage
|
|
1254
1285
|
gosub to Working
|
|
1255
|
-
wait
|
|
1286
|
+
wait 1
|
|
1256
1287
|
put 0 into Sequence
|
|
1257
1288
|
put 0 into Start
|
|
1258
1289
|
put 0 into Total
|
|
@@ -1355,16 +1386,16 @@ CheckDevice:
|
|
|
1355
1386
|
begin
|
|
1356
1387
|
put `No response from ` cat Name into StatusMessage
|
|
1357
1388
|
gosub to Error
|
|
1358
|
-
put 0 into Uptime
|
|
1389
|
+
put `0` into Uptime
|
|
1359
1390
|
end
|
|
1360
1391
|
else put from 3 of Response into Uptime
|
|
1361
1392
|
|
|
1362
1393
|
CheckDevice2:
|
|
1363
1394
|
put the position of ` ` in Uptime into P
|
|
1364
|
-
put left P of Uptime into Uptime
|
|
1395
|
+
if P is greater than 0 put left P of Uptime into Uptime
|
|
1365
1396
|
log Name cat ` uptime: ` cat Uptime
|
|
1366
1397
|
set the text of UptimeLabel to Uptime
|
|
1367
|
-
|
|
1398
|
+
go to OK
|
|
1368
1399
|
|
|
1369
1400
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
1370
1401
|
! Turn a relay OFF
|
|
@@ -1377,7 +1408,7 @@ RelayOffClick:
|
|
|
1377
1408
|
begin
|
|
1378
1409
|
put `No response from ` cat Name into StatusMessage
|
|
1379
1410
|
gosub to Error
|
|
1380
|
-
put 0 into Uptime
|
|
1411
|
+
put `0` into Uptime
|
|
1381
1412
|
end
|
|
1382
1413
|
begin
|
|
1383
1414
|
put from 3 of Response into Uptime
|
|
@@ -1397,7 +1428,7 @@ RelayOnClick:
|
|
|
1397
1428
|
begin
|
|
1398
1429
|
put `No response from ` cat Name into StatusMessage
|
|
1399
1430
|
gosub to Error
|
|
1400
|
-
put 0 into Uptime
|
|
1431
|
+
put `0` into Uptime
|
|
1401
1432
|
end
|
|
1402
1433
|
else
|
|
1403
1434
|
begin
|
|
@@ -1465,10 +1496,11 @@ SendMessageToDevice:
|
|
|
1465
1496
|
put empty into Response
|
|
1466
1497
|
return
|
|
1467
1498
|
end
|
|
1499
|
+
! log URL cat ` - ` cat Response
|
|
1468
1500
|
return
|
|
1469
1501
|
|
|
1470
1502
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
1471
|
-
! Get
|
|
1503
|
+
! Get information about a device
|
|
1472
1504
|
GetDeviceData:
|
|
1473
1505
|
put property `name` of Device into Name
|
|
1474
1506
|
put property `ssid` of Device into SSID
|
|
@@ -1485,14 +1517,15 @@ GetDeviceData:
|
|
|
1485
1517
|
! Post the config data
|
|
1486
1518
|
PostConfigData:
|
|
1487
1519
|
if CurrentSSID is not HostSSID gosub to ConnectToHost
|
|
1488
|
-
if SystemMAC is empty return
|
|
1489
1520
|
save prettify Config to ConfigFile
|
|
1490
1521
|
! log `Config: ` cat prettify Config
|
|
1522
|
+
if SystemMAC is empty return
|
|
1523
|
+
if SystemConfig is empty return
|
|
1491
1524
|
put `https://rbrheating.com/ui/resources/php/rest.php/config/` cat SystemMAC cat `/` cat SystemPassword into URL
|
|
1492
|
-
log
|
|
1525
|
+
! log URL cat ` ` cat prettify SystemConfig
|
|
1526
|
+
! log `Posting SystemConfig to ` cat URL
|
|
1493
1527
|
post stringify SystemConfig to URL
|
|
1494
|
-
or
|
|
1495
|
-
begin
|
|
1528
|
+
or begin
|
|
1496
1529
|
put `I couldn't post the config file` into StatusMessage
|
|
1497
1530
|
go to Error
|
|
1498
1531
|
end
|
easycoder-250505.3/demo.ecs
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
use graphics
|
|
2
|
-
|
|
3
|
-
window Window
|
|
4
|
-
layout MainPanel
|
|
5
|
-
label Label
|
|
6
|
-
pushbutton Button
|
|
7
|
-
|
|
8
|
-
! Initialize the graphics environment
|
|
9
|
-
init graphics
|
|
10
|
-
|
|
11
|
-
! Create a main window
|
|
12
|
-
create MainPanel type QVBoxLayout
|
|
13
|
-
|
|
14
|
-
! Create a label
|
|
15
|
-
create Label text `Click the button!`
|
|
16
|
-
add Label to MainPanel
|
|
17
|
-
|
|
18
|
-
! Create a button
|
|
19
|
-
create Button text `Click Me`
|
|
20
|
-
on click Button go to ButtonClick
|
|
21
|
-
add Button to MainPanel
|
|
22
|
-
|
|
23
|
-
! Create and show the window
|
|
24
|
-
create Window title `Example` size 400 300 layout MainPanel
|
|
25
|
-
show Window
|
|
26
|
-
|
|
27
|
-
start graphics
|
|
28
|
-
stop
|
|
29
|
-
|
|
30
|
-
! Event handler for button click
|
|
31
|
-
ButtonClick:
|
|
32
|
-
set the text of Label to `Button clicked!`
|
|
33
|
-
stop
|
|
34
|
-
|
easycoder-250505.3/group.py
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
from PyQt6.QtWidgets import *
|
|
2
|
-
import sys
|
|
3
|
-
|
|
4
|
-
class GroupBox(QWidget):
|
|
5
|
-
|
|
6
|
-
def __init__(self):
|
|
7
|
-
QWidget.__init__(self)
|
|
8
|
-
|
|
9
|
-
self.setWindowTitle("GroupBox")
|
|
10
|
-
layout = QGridLayout()
|
|
11
|
-
self.setLayout(layout)
|
|
12
|
-
|
|
13
|
-
groupbox = QGroupBox("GroupBox Example")
|
|
14
|
-
# groupbox.setCheckable(True)
|
|
15
|
-
layout.addWidget(groupbox)
|
|
16
|
-
|
|
17
|
-
vbox = QVBoxLayout()
|
|
18
|
-
groupbox.setLayout(vbox)
|
|
19
|
-
|
|
20
|
-
radiobutton = QRadioButton("RadioButton 1")
|
|
21
|
-
vbox.addWidget(radiobutton)
|
|
22
|
-
|
|
23
|
-
radiobutton = QRadioButton("RadioButton 2")
|
|
24
|
-
vbox.addWidget(radiobutton)
|
|
25
|
-
|
|
26
|
-
radiobutton = QRadioButton("RadioButton 3")
|
|
27
|
-
vbox.addWidget(radiobutton)
|
|
28
|
-
|
|
29
|
-
radiobutton = QRadioButton("RadioButton 4")
|
|
30
|
-
vbox.addWidget(radiobutton)
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
app = QApplication(sys.argv)
|
|
34
|
-
screen = GroupBox()
|
|
35
|
-
screen.show()
|
|
36
|
-
sys.exit(app.exec())
|