Skip to content

Commit

Permalink
release for v4.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Neutree committed Sep 5, 2024
1 parent 448a3c2 commit 9d3f41d
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 15 deletions.
24 changes: 13 additions & 11 deletions examples/tools/maixcam_switch_usb_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,20 @@

cmd_restart = "/etc/init.d/S03usbdev stop &&/etc/init.d/S03usbdev start"

device_list = [
["/boot/usb.ncm", True],
["/boot/usb.rndis", True],
["/boot/usb.keyboard", False],
["/boot/usb.mouse", False],
["/boot/usb.touchpad", False]
]

def usb_devive(device_list):
if os.path.exists("/boot/usb.host"):
os.remove("/boot/usb.host")
with open("/boot/usb.dev", "w") as f:
pass

for device in device_list:
dev_path = f"/boot/usb.{device[0]}"
if device[1]:
with open(device[0], "w") as f:
with open(dev_path, "w") as f:
pass
else:
if os.path.exists(device[0]):
os.remove(device[0])
if os.path.exists(dev_path):
os.remove(dev_path)

ret = os.system(cmd_restart)
if ret != 0:
Expand Down Expand Up @@ -51,6 +44,15 @@ def list_usb_devices():
mode = "device" # MaixCAM as device
# mode = "host" # MaixCAM as host, you can plugin devices to MaixCAM's USB like USB camera.

# device mode functions, set your need to True and others to False. only support 4 devices for MaixCAM.
device_list = [
["ncm", True], # NCM virtual network card, faster trhan RNDIS but need manual install driver on windows <=10.
["rndis", True], # RNDIS virtual network card, compatible for Windows and Linux but MacOS not suppot.
["keyboard", False], # Simulate USB HID keyboard input, then use maix.hid module.
["mouse", False], # Simulate USB HID mouse input, then use maix.hid module.
["touchpad", False] # Simulate USB HID touchpad input, then use maix.hid module.
]

if mode == "device":
usb_devive(device_list)
else:
Expand Down
4 changes: 2 additions & 2 deletions maix/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Versions should comply with PEP440: https://peps.python.org/pep-0440/

version_major = 4
version_minor = 4
version_patch = 22
version_minor = 5
version_patch = 0

__version__ = "{}.{}.{}".format(version_major, version_minor, version_patch)
Binary file removed projects/app_mouse_simulator/app.png
Binary file not shown.
2 changes: 1 addition & 1 deletion projects/app_mouse_simulator/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ id: mouse
name: Mouse Simulator
version: 1.0.0
author: Sipeed Ltd
icon: app.png
icon: icon.png
desc: Simulate using a mouse to control the mouse
files:
- app.yaml
Expand Down
Binary file modified projects/app_mouse_simulator/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion tools/os/base_system_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20240816
20240905

0 comments on commit 9d3f41d

Please sign in to comment.