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.

Files changed (69) hide show
  1. micrOS/release_info/micrOS_ReleaseInfo/system_analysis_sum.json +35 -35
  2. micrOS/source/Common.py +5 -13
  3. micrOS/source/Config.py +5 -2
  4. micrOS/source/Espnow.py +101 -45
  5. micrOS/source/Files.py +50 -23
  6. micrOS/source/InterConnect.py +10 -5
  7. micrOS/source/Pacman.py +141 -0
  8. micrOS/source/Shell.py +1 -1
  9. micrOS/source/Tasks.py +59 -54
  10. micrOS/source/modules/LM_buzzer.py +1 -4
  11. micrOS/source/modules/LM_cct.py +2 -4
  12. micrOS/source/modules/LM_dimmer.py +1 -2
  13. micrOS/source/modules/LM_distance.py +1 -3
  14. micrOS/source/modules/LM_i2s_mic.py +1 -2
  15. micrOS/source/modules/LM_keychain.py +1 -2
  16. micrOS/source/modules/LM_light_sensor.py +1 -4
  17. micrOS/source/modules/LM_mqtt_client.py +13 -10
  18. micrOS/source/modules/LM_neopixel.py +1 -2
  19. micrOS/source/modules/LM_oled_ui.py +39 -41
  20. micrOS/source/modules/LM_oledui.py +58 -89
  21. micrOS/source/modules/LM_pacman.py +36 -44
  22. micrOS/source/modules/LM_presence.py +1 -2
  23. micrOS/source/modules/LM_rest.py +1 -2
  24. micrOS/source/modules/LM_rgb.py +1 -2
  25. micrOS/source/modules/LM_roboarm.py +3 -4
  26. micrOS/source/modules/LM_robustness.py +1 -2
  27. micrOS/source/modules/LM_telegram.py +1 -2
  28. micrOS/source/urequests.py +1 -1
  29. {microsdevtoolkit-2.19.0.dist-info → microsdevtoolkit-2.21.0.dist-info}/METADATA +153 -214
  30. {microsdevtoolkit-2.19.0.dist-info → microsdevtoolkit-2.21.0.dist-info}/RECORD +67 -67
  31. toolkit/DevEnvOTA.py +2 -2
  32. toolkit/DevEnvUSB.py +1 -1
  33. toolkit/dashboard_apps/SystemTest.py +17 -14
  34. toolkit/lib/micrOSClient.py +37 -15
  35. toolkit/lib/micrOSClientHistory.py +35 -1
  36. toolkit/simulator_lib/__pycache__/uos.cpython-312.pyc +0 -0
  37. toolkit/simulator_lib/uos.py +1 -0
  38. toolkit/workspace/precompiled/Common.mpy +0 -0
  39. toolkit/workspace/precompiled/Config.mpy +0 -0
  40. toolkit/workspace/precompiled/Espnow.mpy +0 -0
  41. toolkit/workspace/precompiled/Files.mpy +0 -0
  42. toolkit/workspace/precompiled/InterConnect.mpy +0 -0
  43. toolkit/workspace/precompiled/Pacman.mpy +0 -0
  44. toolkit/workspace/precompiled/Shell.mpy +0 -0
  45. toolkit/workspace/precompiled/Tasks.mpy +0 -0
  46. toolkit/workspace/precompiled/modules/LM_buzzer.mpy +0 -0
  47. toolkit/workspace/precompiled/modules/LM_cct.mpy +0 -0
  48. toolkit/workspace/precompiled/modules/LM_dimmer.mpy +0 -0
  49. toolkit/workspace/precompiled/modules/LM_distance.mpy +0 -0
  50. toolkit/workspace/precompiled/modules/LM_i2s_mic.mpy +0 -0
  51. toolkit/workspace/precompiled/modules/LM_keychain.mpy +0 -0
  52. toolkit/workspace/precompiled/modules/LM_light_sensor.mpy +0 -0
  53. toolkit/workspace/precompiled/modules/LM_mqtt_client.mpy +0 -0
  54. toolkit/workspace/precompiled/modules/LM_neopixel.mpy +0 -0
  55. toolkit/workspace/precompiled/modules/LM_oled_ui.mpy +0 -0
  56. toolkit/workspace/precompiled/modules/LM_oledui.mpy +0 -0
  57. toolkit/workspace/precompiled/modules/LM_pacman.mpy +0 -0
  58. toolkit/workspace/precompiled/modules/LM_presence.mpy +0 -0
  59. toolkit/workspace/precompiled/modules/LM_rest.mpy +0 -0
  60. toolkit/workspace/precompiled/modules/LM_rgb.mpy +0 -0
  61. toolkit/workspace/precompiled/modules/LM_roboarm.mpy +0 -0
  62. toolkit/workspace/precompiled/modules/LM_robustness.py +1 -2
  63. toolkit/workspace/precompiled/modules/LM_telegram.mpy +0 -0
  64. micrOS/source/modules/LM_pet_feeder.py +0 -78
  65. toolkit/workspace/precompiled/modules/LM_pet_feeder.py +0 -78
  66. {microsdevtoolkit-2.19.0.data → microsdevtoolkit-2.21.0.data}/scripts/devToolKit.py +0 -0
  67. {microsdevtoolkit-2.19.0.dist-info → microsdevtoolkit-2.21.0.dist-info}/WHEEL +0 -0
  68. {microsdevtoolkit-2.19.0.dist-info → microsdevtoolkit-2.21.0.dist-info}/licenses/LICENSE +0 -0
  69. {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
- state = micro_task(tag=task_tag, task=__task(tag=task_tag, period_ms=5))
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)
@@ -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'