micrOSDevToolKit 2.19.0__py3-none-any.whl → 2.21.0__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 +35 -35
- micrOS/source/Common.py +5 -13
- micrOS/source/Config.py +5 -2
- micrOS/source/Espnow.py +101 -45
- micrOS/source/Files.py +50 -23
- micrOS/source/InterConnect.py +10 -5
- micrOS/source/Pacman.py +141 -0
- micrOS/source/Shell.py +1 -1
- micrOS/source/Tasks.py +59 -54
- micrOS/source/modules/LM_buzzer.py +1 -4
- micrOS/source/modules/LM_cct.py +2 -4
- micrOS/source/modules/LM_dimmer.py +1 -2
- micrOS/source/modules/LM_distance.py +1 -3
- micrOS/source/modules/LM_i2s_mic.py +1 -2
- micrOS/source/modules/LM_keychain.py +1 -2
- micrOS/source/modules/LM_light_sensor.py +1 -4
- micrOS/source/modules/LM_mqtt_client.py +13 -10
- micrOS/source/modules/LM_neopixel.py +1 -2
- micrOS/source/modules/LM_oled_ui.py +39 -41
- micrOS/source/modules/LM_oledui.py +58 -89
- micrOS/source/modules/LM_pacman.py +36 -44
- micrOS/source/modules/LM_presence.py +1 -2
- micrOS/source/modules/LM_rest.py +1 -2
- micrOS/source/modules/LM_rgb.py +1 -2
- micrOS/source/modules/LM_roboarm.py +3 -4
- micrOS/source/modules/LM_robustness.py +1 -2
- micrOS/source/modules/LM_telegram.py +1 -2
- micrOS/source/urequests.py +1 -1
- {microsdevtoolkit-2.19.0.dist-info → microsdevtoolkit-2.21.0.dist-info}/METADATA +153 -214
- {microsdevtoolkit-2.19.0.dist-info → microsdevtoolkit-2.21.0.dist-info}/RECORD +67 -67
- toolkit/DevEnvOTA.py +2 -2
- toolkit/DevEnvUSB.py +1 -1
- toolkit/dashboard_apps/SystemTest.py +17 -14
- toolkit/lib/micrOSClient.py +37 -15
- toolkit/lib/micrOSClientHistory.py +35 -1
- toolkit/simulator_lib/__pycache__/uos.cpython-312.pyc +0 -0
- toolkit/simulator_lib/uos.py +1 -0
- toolkit/workspace/precompiled/Common.mpy +0 -0
- toolkit/workspace/precompiled/Config.mpy +0 -0
- toolkit/workspace/precompiled/Espnow.mpy +0 -0
- toolkit/workspace/precompiled/Files.mpy +0 -0
- toolkit/workspace/precompiled/InterConnect.mpy +0 -0
- toolkit/workspace/precompiled/Pacman.mpy +0 -0
- toolkit/workspace/precompiled/Shell.mpy +0 -0
- toolkit/workspace/precompiled/Tasks.mpy +0 -0
- toolkit/workspace/precompiled/modules/LM_buzzer.mpy +0 -0
- toolkit/workspace/precompiled/modules/LM_cct.mpy +0 -0
- toolkit/workspace/precompiled/modules/LM_dimmer.mpy +0 -0
- toolkit/workspace/precompiled/modules/LM_distance.mpy +0 -0
- toolkit/workspace/precompiled/modules/LM_i2s_mic.mpy +0 -0
- toolkit/workspace/precompiled/modules/LM_keychain.mpy +0 -0
- toolkit/workspace/precompiled/modules/LM_light_sensor.mpy +0 -0
- toolkit/workspace/precompiled/modules/LM_mqtt_client.mpy +0 -0
- toolkit/workspace/precompiled/modules/LM_neopixel.mpy +0 -0
- toolkit/workspace/precompiled/modules/LM_oled_ui.mpy +0 -0
- toolkit/workspace/precompiled/modules/LM_oledui.mpy +0 -0
- toolkit/workspace/precompiled/modules/LM_pacman.mpy +0 -0
- toolkit/workspace/precompiled/modules/LM_presence.mpy +0 -0
- toolkit/workspace/precompiled/modules/LM_rest.mpy +0 -0
- toolkit/workspace/precompiled/modules/LM_rgb.mpy +0 -0
- toolkit/workspace/precompiled/modules/LM_roboarm.mpy +0 -0
- toolkit/workspace/precompiled/modules/LM_robustness.py +1 -2
- toolkit/workspace/precompiled/modules/LM_telegram.mpy +0 -0
- micrOS/source/modules/LM_pet_feeder.py +0 -78
- toolkit/workspace/precompiled/modules/LM_pet_feeder.py +0 -78
- {microsdevtoolkit-2.19.0.data → microsdevtoolkit-2.21.0.data}/scripts/devToolKit.py +0 -0
- {microsdevtoolkit-2.19.0.dist-info → microsdevtoolkit-2.21.0.dist-info}/WHEEL +0 -0
- {microsdevtoolkit-2.19.0.dist-info → microsdevtoolkit-2.21.0.dist-info}/licenses/LICENSE +0 -0
- {microsdevtoolkit-2.19.0.dist-info → microsdevtoolkit-2.21.0.dist-info}/top_level.txt +0 -0
|
@@ -83,8 +83,7 @@ def create_task():
|
|
|
83
83
|
"""
|
|
84
84
|
# [!] ASYNC TASK CREATION [1*] with async task callback + taskID (TAG) handling
|
|
85
85
|
task_tag = "microtask.run"
|
|
86
|
-
|
|
87
|
-
return "Starting" if state else "Already running"
|
|
86
|
+
return micro_task(tag=task_tag, task=__task(tag=task_tag, period_ms=5))
|
|
88
87
|
|
|
89
88
|
|
|
90
89
|
@micro_task("microtask", _wrap=True)
|
|
Binary file
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
from LM_servo import sduty, deinit, pinmap as servo_pinmap
|
|
2
|
-
from LM_stepper import step, pinmap as stepper_pinmap
|
|
3
|
-
from Common import micro_task
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class Data:
|
|
7
|
-
TASK_TAG = "pet_feeder.portion"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
async def __portion_task(portion, posmin, posmax):
|
|
11
|
-
# ASYNC TASK ADAPTER [*2] with automatic state management
|
|
12
|
-
# [micro_task->Task] TaskManager access to task internals (out, done attributes)
|
|
13
|
-
with micro_task(tag=Data.TASK_TAG) as my_task:
|
|
14
|
-
for p in range(0, portion):
|
|
15
|
-
# [1]Run pos fill up
|
|
16
|
-
for pos in range(posmin, posmax):
|
|
17
|
-
sduty(pos)
|
|
18
|
-
await my_task.feed(sleep_ms=15)
|
|
19
|
-
# [2]Wait between fill up / food out
|
|
20
|
-
await my_task.feed(sleep_ms=500)
|
|
21
|
-
# [3]Run pos food out
|
|
22
|
-
for pos in range(posmax, posmin, -1):
|
|
23
|
-
sduty(pos)
|
|
24
|
-
await my_task.feed(sleep_ms=20)
|
|
25
|
-
my_task.out = "{}/{} serving".format(p+1, portion)
|
|
26
|
-
deinit()
|
|
27
|
-
my_task.out += ": {} task done".format(Data.TASK_TAG)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
def serve(portion=1, posmin=65, posmax=97):
|
|
31
|
-
"""
|
|
32
|
-
Pet feeder - with servo motor
|
|
33
|
-
:param portion: number of portions (min/max positions to repeat)
|
|
34
|
-
:param posmin: servo "start" position
|
|
35
|
-
:param posmax: servo "stop" position
|
|
36
|
-
"""
|
|
37
|
-
# [!] ASYNC TASK CREATION [1*] with async task callback + taskID (TAG) handling
|
|
38
|
-
state = micro_task(tag=Data.TASK_TAG, task=__portion_task(portion=portion, posmin=posmin, posmax=posmax))
|
|
39
|
-
return "Starting" if state else "Already running"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
def serve_w_stepper(portion=1, forward=135, back=10):
|
|
43
|
-
"""
|
|
44
|
-
Pet feeder (beta) - with stepper motor
|
|
45
|
-
:param count: number of portions
|
|
46
|
-
:param forward: s
|
|
47
|
-
:param back:
|
|
48
|
-
"""
|
|
49
|
-
for _ in range(portion):
|
|
50
|
-
# portion move
|
|
51
|
-
step(forward)
|
|
52
|
-
# Safety anti-block solution?
|
|
53
|
-
step(-back)
|
|
54
|
-
step(back)
|
|
55
|
-
step(-back)
|
|
56
|
-
step(back)
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
def pinmap():
|
|
60
|
-
"""
|
|
61
|
-
[i] micrOS LM naming convention
|
|
62
|
-
Shows logical pins - pin number(s) used by this Load module
|
|
63
|
-
- info which pins to use for this application
|
|
64
|
-
:return dict: pin name (str) - pin value (int) pairs
|
|
65
|
-
"""
|
|
66
|
-
p = servo_pinmap()
|
|
67
|
-
p.update(stepper_pinmap())
|
|
68
|
-
return p
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
def help(widgets=False):
|
|
72
|
-
"""
|
|
73
|
-
[i] micrOS LM naming convention - built-in help message
|
|
74
|
-
:return tuple:
|
|
75
|
-
(widgets=False) list of functions implemented by this application
|
|
76
|
-
(widgets=True) list of widget json for UI generation
|
|
77
|
-
"""
|
|
78
|
-
return 'serve portion=1 \t\t[info] servo control', 'serve_w_stepper portion=1 \t[info] stepper control'
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
from LM_servo import sduty, deinit, pinmap as servo_pinmap
|
|
2
|
-
from LM_stepper import step, pinmap as stepper_pinmap
|
|
3
|
-
from Common import micro_task
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class Data:
|
|
7
|
-
TASK_TAG = "pet_feeder.portion"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
async def __portion_task(portion, posmin, posmax):
|
|
11
|
-
# ASYNC TASK ADAPTER [*2] with automatic state management
|
|
12
|
-
# [micro_task->Task] TaskManager access to task internals (out, done attributes)
|
|
13
|
-
with micro_task(tag=Data.TASK_TAG) as my_task:
|
|
14
|
-
for p in range(0, portion):
|
|
15
|
-
# [1]Run pos fill up
|
|
16
|
-
for pos in range(posmin, posmax):
|
|
17
|
-
sduty(pos)
|
|
18
|
-
await my_task.feed(sleep_ms=15)
|
|
19
|
-
# [2]Wait between fill up / food out
|
|
20
|
-
await my_task.feed(sleep_ms=500)
|
|
21
|
-
# [3]Run pos food out
|
|
22
|
-
for pos in range(posmax, posmin, -1):
|
|
23
|
-
sduty(pos)
|
|
24
|
-
await my_task.feed(sleep_ms=20)
|
|
25
|
-
my_task.out = "{}/{} serving".format(p+1, portion)
|
|
26
|
-
deinit()
|
|
27
|
-
my_task.out += ": {} task done".format(Data.TASK_TAG)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
def serve(portion=1, posmin=65, posmax=97):
|
|
31
|
-
"""
|
|
32
|
-
Pet feeder - with servo motor
|
|
33
|
-
:param portion: number of portions (min/max positions to repeat)
|
|
34
|
-
:param posmin: servo "start" position
|
|
35
|
-
:param posmax: servo "stop" position
|
|
36
|
-
"""
|
|
37
|
-
# [!] ASYNC TASK CREATION [1*] with async task callback + taskID (TAG) handling
|
|
38
|
-
state = micro_task(tag=Data.TASK_TAG, task=__portion_task(portion=portion, posmin=posmin, posmax=posmax))
|
|
39
|
-
return "Starting" if state else "Already running"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
def serve_w_stepper(portion=1, forward=135, back=10):
|
|
43
|
-
"""
|
|
44
|
-
Pet feeder (beta) - with stepper motor
|
|
45
|
-
:param count: number of portions
|
|
46
|
-
:param forward: s
|
|
47
|
-
:param back:
|
|
48
|
-
"""
|
|
49
|
-
for _ in range(portion):
|
|
50
|
-
# portion move
|
|
51
|
-
step(forward)
|
|
52
|
-
# Safety anti-block solution?
|
|
53
|
-
step(-back)
|
|
54
|
-
step(back)
|
|
55
|
-
step(-back)
|
|
56
|
-
step(back)
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
def pinmap():
|
|
60
|
-
"""
|
|
61
|
-
[i] micrOS LM naming convention
|
|
62
|
-
Shows logical pins - pin number(s) used by this Load module
|
|
63
|
-
- info which pins to use for this application
|
|
64
|
-
:return dict: pin name (str) - pin value (int) pairs
|
|
65
|
-
"""
|
|
66
|
-
p = servo_pinmap()
|
|
67
|
-
p.update(stepper_pinmap())
|
|
68
|
-
return p
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
def help(widgets=False):
|
|
72
|
-
"""
|
|
73
|
-
[i] micrOS LM naming convention - built-in help message
|
|
74
|
-
:return tuple:
|
|
75
|
-
(widgets=False) list of functions implemented by this application
|
|
76
|
-
(widgets=True) list of widget json for UI generation
|
|
77
|
-
"""
|
|
78
|
-
return 'serve portion=1 \t\t[info] servo control', 'serve_w_stepper portion=1 \t[info] stepper control'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|