You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
Tweak settings and boards
This commit is contained in:
@@ -43,15 +43,16 @@ class SettingsActivity(Activity):
|
||||
("Turquoise", "40e0d0")
|
||||
]
|
||||
self.settings = [
|
||||
# Novice settings, alphabetically:
|
||||
{"title": "Calibrate IMU", "key": "calibrate_imu", "value_label": None, "cont": None, "ui": "activity", "activity_class": "CalibrateIMUActivity"},
|
||||
{"title": "Check IMU Calibration", "key": "check_imu_calibration", "value_label": None, "cont": None, "ui": "activity", "activity_class": "CheckIMUCalibrationActivity"},
|
||||
# Basic settings, alphabetically:
|
||||
{"title": "Light/Dark Theme", "key": "theme_light_dark", "value_label": None, "cont": None, "ui": "radiobuttons", "ui_options": [("Light", "light"), ("Dark", "dark")]},
|
||||
{"title": "Theme Color", "key": "theme_primary_color", "value_label": None, "cont": None, "placeholder": "HTML hex color, like: EC048C", "ui": "dropdown", "ui_options": theme_colors},
|
||||
{"title": "Timezone", "key": "timezone", "value_label": None, "cont": None, "ui": "dropdown", "ui_options": self.get_timezone_tuples(), "changed_callback": lambda : mpos.time.refresh_timezone_preference()},
|
||||
# Advanced settings, alphabetically:
|
||||
{"title": "Audio Output Device", "key": "audio_device", "value_label": None, "cont": None, "ui": "radiobuttons", "ui_options": [("Auto-detect", "auto"), ("I2S (Digital Audio)", "i2s"), ("Buzzer (PWM Tones)", "buzzer"), ("Both I2S and Buzzer", "both"), ("Disabled", "null")], "changed_callback": self.audio_device_changed},
|
||||
#{"title": "Audio Output Device", "key": "audio_device", "value_label": None, "cont": None, "ui": "radiobuttons", "ui_options": [("Auto-detect", "auto"), ("I2S (Digital Audio)", "i2s"), ("Buzzer (PWM Tones)", "buzzer"), ("Both I2S and Buzzer", "both"), ("Disabled", "null")], "changed_callback": self.audio_device_changed},
|
||||
{"title": "Auto Start App", "key": "auto_start_app", "value_label": None, "cont": None, "ui": "radiobuttons", "ui_options": [(app.name, app.fullname) for app in PackageManager.get_app_list()]},
|
||||
{"title": "Check IMU Calibration", "key": "check_imu_calibration", "value_label": None, "cont": None, "ui": "activity", "activity_class": "CheckIMUCalibrationActivity"},
|
||||
{"title": "Recalibrate IMU", "key": "calibrate_imu", "value_label": None, "cont": None, "ui": "activity", "activity_class": "CalibrateIMUActivity"},
|
||||
# Expert settings, alphabetically
|
||||
{"title": "Restart to Bootloader", "key": "boot_mode", "value_label": None, "cont": None, "ui": "radiobuttons", "ui_options": [("Normal", "normal"), ("Bootloader", "bootloader")]}, # special that doesn't get saved
|
||||
{"title": "Format internal data partition", "key": "format_internal_data_partition", "value_label": None, "cont": None, "ui": "radiobuttons", "ui_options": [("No, do not format", "no"), ("Yes, erase all settings, files and non-builtin apps", "yes")]}, # special that doesn't get saved
|
||||
# This is currently only in the drawer but would make sense to have it here for completeness:
|
||||
|
||||
@@ -386,4 +386,4 @@ def startup_wow_effect():
|
||||
_thread.stack_size(mpos.apps.good_stack_size()) # default stack size won't work, crashes!
|
||||
_thread.start_new_thread(startup_wow_effect, ())
|
||||
|
||||
print("boot.py finished")
|
||||
print("fri3d_2024.py finished")
|
||||
|
||||
@@ -113,14 +113,8 @@ except Exception as e:
|
||||
# === AUDIO HARDWARE ===
|
||||
import mpos.audio.audioflinger as AudioFlinger
|
||||
|
||||
# Note: Waveshare board has no buzzer or LEDs, only I2S audio
|
||||
# I2S pin configuration will be determined by the board's audio hardware
|
||||
# For now, initialize with I2S only (pins will be configured per-stream if available)
|
||||
AudioFlinger.init(
|
||||
device_type=AudioFlinger.DEVICE_I2S,
|
||||
i2s_pins={'sck': 2, 'ws': 47, 'sd': 16}, # Default ESP32-S3 I2S pins
|
||||
buzzer_instance=None
|
||||
)
|
||||
# Note: Waveshare board has no buzzer or I2S audio:
|
||||
AudioFlinger.init(device_type=AudioFlinger.DEVICE_NULL)
|
||||
|
||||
# === LED HARDWARE ===
|
||||
# Note: Waveshare board has no NeoPixel LEDs
|
||||
@@ -133,4 +127,4 @@ import mpos.sensor_manager as SensorManager
|
||||
# i2c_bus was created on line 75 for touch, reuse it for IMU
|
||||
SensorManager.init(i2c_bus, address=0x6B)
|
||||
|
||||
print("boot.py finished")
|
||||
print("waveshare_esp32_s3_touch_lcd_2.py finished")
|
||||
|
||||
Reference in New Issue
Block a user