micrOSDevToolKit 2.9.8__py3-none-any.whl → 2.9.11__py3-none-any.whl
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 micrOSDevToolKit might be problematic. Click here for more details.
- micrOS/release_info/micrOS_ReleaseInfo/system_analysis_sum.json +21 -21
- micrOS/source/LM_espnow.py +27 -1
- micrOS/source/LM_oled_ui.py +1 -1
- micrOS/source/LM_system.py +4 -4
- micrOS/source/Notify.py +4 -0
- micrOS/source/Server.py +1 -1
- micrOS/source/Shell.py +3 -3
- micrOS/source/Tasks.py +1 -1
- micrOS/source/Time.py +7 -8
- micrOS/source/__pycache__/Common.cpython-312.pyc +0 -0
- micrOS/source/__pycache__/Logger.cpython-312.pyc +0 -0
- micrOS/source/__pycache__/Server.cpython-312.pyc +0 -0
- micrOS/source/micrOSloader.py +0 -1
- micrOS/source/urequests.py +14 -7
- {micrOSDevToolKit-2.9.8.data → micrOSDevToolKit-2.9.11.data}/scripts/devToolKit.py +10 -0
- {micrOSDevToolKit-2.9.8.dist-info → micrOSDevToolKit-2.9.11.dist-info}/METADATA +66 -21
- {micrOSDevToolKit-2.9.8.dist-info → micrOSDevToolKit-2.9.11.dist-info}/RECORD +57 -50
- {micrOSDevToolKit-2.9.8.dist-info → micrOSDevToolKit-2.9.11.dist-info}/WHEEL +1 -1
- toolkit/DevEnvOTA.py +13 -9
- toolkit/DevEnvUSB.py +6 -5
- toolkit/MicrOSDevEnv.py +19 -5
- toolkit/WebRepl.py +73 -0
- toolkit/dashboard_apps/BackupRestore.py +20 -35
- toolkit/dashboard_apps/CCTDemo.py +12 -17
- toolkit/dashboard_apps/CCTTest.py +20 -24
- toolkit/dashboard_apps/CamStream.py +2 -6
- toolkit/dashboard_apps/CatGame.py +14 -16
- toolkit/dashboard_apps/Dimmer.py +11 -21
- toolkit/dashboard_apps/GetVersion.py +11 -19
- toolkit/dashboard_apps/MicrophoneTest.py +1 -6
- toolkit/dashboard_apps/NeoEffectsDemo.py +28 -34
- toolkit/dashboard_apps/NeopixelTest.py +20 -25
- toolkit/dashboard_apps/PresenceTest.py +2 -8
- toolkit/dashboard_apps/RGBTest.py +20 -24
- toolkit/dashboard_apps/RoboArm.py +24 -32
- toolkit/dashboard_apps/SED_test.py +10 -14
- toolkit/dashboard_apps/SensorsTest.py +61 -0
- toolkit/dashboard_apps/SystemTest.py +151 -77
- toolkit/dashboard_apps/Template_app.py +11 -23
- toolkit/dashboard_apps/_app_base.py +34 -0
- toolkit/dashboard_apps/uLightDemo.py +15 -24
- toolkit/lib/Repository.py +64 -0
- toolkit/lib/micrOSClient.py +16 -11
- toolkit/micrOSlint.py +3 -3
- toolkit/simulator_lib/__pycache__/aioespnow.cpython-312.pyc +0 -0
- toolkit/simulator_lib/aioespnow.py +28 -0
- toolkit/socketClient.py +0 -1
- toolkit/workspace/precompiled/LM_espnow.py +27 -1
- toolkit/workspace/precompiled/LM_oled_ui.mpy +0 -0
- toolkit/workspace/precompiled/LM_system.mpy +0 -0
- toolkit/workspace/precompiled/Notify.mpy +0 -0
- toolkit/workspace/precompiled/Shell.mpy +0 -0
- toolkit/workspace/precompiled/Time.mpy +0 -0
- toolkit/workspace/precompiled/micrOSloader.mpy +0 -0
- toolkit/workspace/precompiled/urequests.mpy +0 -0
- toolkit/dashboard_apps/AirQualityBME280.py +0 -36
- toolkit/dashboard_apps/AirQualityDHT22_CO2.py +0 -36
- {micrOSDevToolKit-2.9.8.dist-info → micrOSDevToolKit-2.9.11.dist-info}/LICENSE +0 -0
- {micrOSDevToolKit-2.9.8.dist-info → micrOSDevToolKit-2.9.11.dist-info}/top_level.txt +0 -0
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
sys.path.append(os.path.dirname(MYPATH))
|
|
8
|
-
import socketClient
|
|
3
|
+
try:
|
|
4
|
+
from ._app_base import AppBase
|
|
5
|
+
except:
|
|
6
|
+
from _app_base import AppBase
|
|
9
7
|
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
DEVICE = 'RoboArm'
|
|
9
|
+
CLIENT = None
|
|
13
10
|
__TEST_DATA = {'ok': 0, 'err': 0}
|
|
14
11
|
|
|
15
12
|
|
|
@@ -22,58 +19,53 @@ def test_eval(state, msg):
|
|
|
22
19
|
__TEST_DATA['err'] += 1
|
|
23
20
|
|
|
24
21
|
|
|
25
|
-
def
|
|
26
|
-
return ['--dev', DEVICE]
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
def app(devfid=None):
|
|
22
|
+
def app(devfid=None, pwd=None):
|
|
30
23
|
"""
|
|
31
24
|
devfid: selected device input
|
|
32
25
|
send command(s) over socket connection [socketClient.run(args)]
|
|
33
26
|
<a> command separator in single connection
|
|
34
27
|
"""
|
|
35
|
-
global
|
|
36
|
-
|
|
37
|
-
DEVICE = devfid
|
|
28
|
+
global CLIENT
|
|
29
|
+
CLIENT = AppBase(device=devfid, password=pwd)
|
|
38
30
|
|
|
39
31
|
def home():
|
|
40
|
-
args =
|
|
41
|
-
status, answer =
|
|
32
|
+
args = ['roboarm control 75 70']
|
|
33
|
+
status, answer = CLIENT.run(args)
|
|
42
34
|
test_eval(status, answer)
|
|
43
35
|
|
|
44
36
|
def switch(state=False):
|
|
45
|
-
args =
|
|
46
|
-
status, answer =
|
|
37
|
+
args = ['switch set_state {}'.format(state)]
|
|
38
|
+
status, answer = CLIENT.run(args)
|
|
47
39
|
print(answer)
|
|
48
40
|
|
|
49
41
|
home()
|
|
50
42
|
switch(True)
|
|
51
43
|
|
|
52
|
-
args =
|
|
53
|
-
status, answer =
|
|
44
|
+
args = ['roboarm control 40 40 speed_ms=7']
|
|
45
|
+
status, answer = CLIENT.run(args)
|
|
54
46
|
test_eval(status, answer)
|
|
55
47
|
|
|
56
48
|
home()
|
|
57
49
|
|
|
58
|
-
args =
|
|
59
|
-
status, answer =
|
|
50
|
+
args = ['roboarm control 115 115']
|
|
51
|
+
status, answer = CLIENT.run(args)
|
|
60
52
|
test_eval(status, answer)
|
|
61
53
|
|
|
62
|
-
args =
|
|
63
|
-
status, answer =
|
|
54
|
+
args = ['roboarm control 40 115']
|
|
55
|
+
status, answer = CLIENT.run(args)
|
|
64
56
|
test_eval(status, answer)
|
|
65
57
|
|
|
66
|
-
args =
|
|
67
|
-
status, answer =
|
|
58
|
+
args = ['roboarm control 115 40']
|
|
59
|
+
status, answer = CLIENT.run(args)
|
|
68
60
|
test_eval(status, answer)
|
|
69
61
|
|
|
70
|
-
args =
|
|
71
|
-
status, answer =
|
|
62
|
+
args = ['roboarm control 40 40']
|
|
63
|
+
status, answer = CLIENT.run(args)
|
|
72
64
|
test_eval(status, answer)
|
|
73
65
|
|
|
74
66
|
# Move back to home pos
|
|
75
|
-
args =
|
|
76
|
-
status, answer =
|
|
67
|
+
args = ['roboarm control 75 70 speed_ms=3']
|
|
68
|
+
status, answer = CLIENT.run(args)
|
|
77
69
|
test_eval(status, answer)
|
|
78
70
|
|
|
79
71
|
switch(False)
|
|
@@ -3,18 +3,15 @@
|
|
|
3
3
|
import os
|
|
4
4
|
import sys
|
|
5
5
|
import time
|
|
6
|
+
|
|
6
7
|
MYPATH = os.path.dirname(os.path.abspath(__file__))
|
|
7
|
-
sys.path.append(os.path.dirname(MYPATH))
|
|
8
|
-
import socketClient
|
|
9
8
|
sys.path.append(os.path.join(MYPATH, '../lib/'))
|
|
10
9
|
from TerminalColors import Colors
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
def base_cmd():
|
|
17
|
-
return ['--dev', DEVICE]
|
|
11
|
+
try:
|
|
12
|
+
from ._app_base import AppBase
|
|
13
|
+
except:
|
|
14
|
+
from _app_base import AppBase
|
|
18
15
|
|
|
19
16
|
|
|
20
17
|
def test():
|
|
@@ -68,22 +65,21 @@ def test():
|
|
|
68
65
|
return status
|
|
69
66
|
|
|
70
67
|
|
|
71
|
-
def app(devfid=None):
|
|
68
|
+
def app(devfid=None, pwd=None):
|
|
72
69
|
"""
|
|
73
70
|
devfid: selected device input
|
|
74
71
|
send command(s) over socket connection [socketClient.run(args)]
|
|
75
72
|
"""
|
|
76
|
-
global
|
|
77
|
-
|
|
78
|
-
|
|
73
|
+
global CLIENT
|
|
74
|
+
CLIENT = AppBase(device=devfid, password=pwd)
|
|
75
|
+
|
|
79
76
|
verdict = test()
|
|
80
77
|
col = Colors.OK if verdict else Colors.ERR
|
|
81
78
|
print("VERDICT: {}{}{}".format(col, verdict, Colors.NC))
|
|
82
79
|
|
|
83
80
|
|
|
84
81
|
def send_cmd(cmd_list):
|
|
85
|
-
|
|
86
|
-
status, answer = socketClient.run(args)
|
|
82
|
+
status, answer = CLIENT.run(cmd_list)
|
|
87
83
|
col = Colors.OK if status else Colors.ERR
|
|
88
84
|
print("CMDS: {}\n{}{}{}\n".format(cmd_list, col, answer, Colors.NC))
|
|
89
85
|
return status
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
MYPATH = os.path.dirname(os.path.abspath(__file__))
|
|
5
|
+
|
|
6
|
+
try:
|
|
7
|
+
from ._app_base import AppBase
|
|
8
|
+
except:
|
|
9
|
+
from _app_base import AppBase
|
|
10
|
+
|
|
11
|
+
CLIENT = None
|
|
12
|
+
|
|
13
|
+
def measure(args, req_cnt=5):
|
|
14
|
+
verdict = f"Measure with {args[0]}"
|
|
15
|
+
print(verdict)
|
|
16
|
+
err_cnt = 0
|
|
17
|
+
for k in range(0, req_cnt):
|
|
18
|
+
try:
|
|
19
|
+
status, answer = CLIENT.run(args)
|
|
20
|
+
if status:
|
|
21
|
+
print(f"\t|- [{k+1}/{req_cnt}] OK")
|
|
22
|
+
else:
|
|
23
|
+
print(f"\t|- [{k+1}/{req_cnt}] ERR")
|
|
24
|
+
err_cnt += 1
|
|
25
|
+
except KeyboardInterrupt:
|
|
26
|
+
break
|
|
27
|
+
verdict = f"{verdict}\t" + "[OK]" if err_cnt == 0 else f"[ERR] {err_cnt}"
|
|
28
|
+
return verdict
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def app(devfid=None, pwd=None):
|
|
32
|
+
global CLIENT
|
|
33
|
+
CLIENT = AppBase(device=devfid, password=pwd)
|
|
34
|
+
report = []
|
|
35
|
+
|
|
36
|
+
state, result = CLIENT.run(['modules'])
|
|
37
|
+
if not state:
|
|
38
|
+
return "Error getting models."
|
|
39
|
+
|
|
40
|
+
if "bme280" in result:
|
|
41
|
+
args = ['bme280 measure']
|
|
42
|
+
report.append(measure(args))
|
|
43
|
+
|
|
44
|
+
if "dht22" in result:
|
|
45
|
+
args = ['dht22 measure']
|
|
46
|
+
report.append(measure(args))
|
|
47
|
+
|
|
48
|
+
if "dht11" in result:
|
|
49
|
+
args = ['dht22 measure']
|
|
50
|
+
report.append(measure(args))
|
|
51
|
+
|
|
52
|
+
if "ds18" in result:
|
|
53
|
+
args = ['ds18 measure']
|
|
54
|
+
report.append(measure(args))
|
|
55
|
+
|
|
56
|
+
print(f"\n======== Sensor test report {CLIENT.get_device()} ========")
|
|
57
|
+
for r in report:
|
|
58
|
+
print(f"\t{r}")
|
|
59
|
+
|
|
60
|
+
if __name__ == "__main__":
|
|
61
|
+
app()
|