automatically rename CPy drive
s-ol
2 months ago
14 | 14 | mode_pressed = row.value |
15 | 15 | |
16 | 16 | root = storage.getmount("/") |
17 | if root.label == "": | |
18 | root.label = "hex33board" | |
19 | 17 | |
20 | 18 | if mode_pressed == board.dev_mode: |
21 | 19 | storage.disable_usb_drive() |
22 | 20 | storage.remount("/", False) |
23 | 21 | print("Mounting read-write") |
22 | ||
23 | if root.label == "" or root.label == "CIRCUITPY": | |
24 | root.label = "hex33board" | |
24 | 25 | else: |
25 | 26 | print("Mounting readonly") |