Skip to content

Commit d720e3b

Browse files
Tweak settings and boards
1 parent 169d1cc commit d720e3b

File tree

3 files changed

+9
-14
lines changed

3 files changed

+9
-14
lines changed

internal_filesystem/builtin/apps/com.micropythonos.settings/assets/settings.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,16 @@ def __init__(self):
4343
("Turquoise", "40e0d0")
4444
]
4545
self.settings = [
46-
# Novice settings, alphabetically:
47-
{"title": "Calibrate IMU", "key": "calibrate_imu", "value_label": None, "cont": None, "ui": "activity", "activity_class": "CalibrateIMUActivity"},
48-
{"title": "Check IMU Calibration", "key": "check_imu_calibration", "value_label": None, "cont": None, "ui": "activity", "activity_class": "CheckIMUCalibrationActivity"},
46+
# Basic settings, alphabetically:
4947
{"title": "Light/Dark Theme", "key": "theme_light_dark", "value_label": None, "cont": None, "ui": "radiobuttons", "ui_options": [("Light", "light"), ("Dark", "dark")]},
5048
{"title": "Theme Color", "key": "theme_primary_color", "value_label": None, "cont": None, "placeholder": "HTML hex color, like: EC048C", "ui": "dropdown", "ui_options": theme_colors},
5149
{"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()},
5250
# Advanced settings, alphabetically:
53-
{"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},
51+
#{"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},
5452
{"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()]},
53+
{"title": "Check IMU Calibration", "key": "check_imu_calibration", "value_label": None, "cont": None, "ui": "activity", "activity_class": "CheckIMUCalibrationActivity"},
54+
{"title": "Recalibrate IMU", "key": "calibrate_imu", "value_label": None, "cont": None, "ui": "activity", "activity_class": "CalibrateIMUActivity"},
55+
# Expert settings, alphabetically
5556
{"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
5657
{"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
5758
# This is currently only in the drawer but would make sense to have it here for completeness:

internal_filesystem/lib/mpos/board/fri3d_2024.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,4 +386,4 @@ def startup_wow_effect():
386386
_thread.stack_size(mpos.apps.good_stack_size()) # default stack size won't work, crashes!
387387
_thread.start_new_thread(startup_wow_effect, ())
388388

389-
print("boot.py finished")
389+
print("fri3d_2024.py finished")

internal_filesystem/lib/mpos/board/waveshare_esp32_s3_touch_lcd_2.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,8 @@ def adc_to_voltage(adc_value):
113113
# === AUDIO HARDWARE ===
114114
import mpos.audio.audioflinger as AudioFlinger
115115

116-
# Note: Waveshare board has no buzzer or LEDs, only I2S audio
117-
# I2S pin configuration will be determined by the board's audio hardware
118-
# For now, initialize with I2S only (pins will be configured per-stream if available)
119-
AudioFlinger.init(
120-
device_type=AudioFlinger.DEVICE_I2S,
121-
i2s_pins={'sck': 2, 'ws': 47, 'sd': 16}, # Default ESP32-S3 I2S pins
122-
buzzer_instance=None
123-
)
116+
# Note: Waveshare board has no buzzer or I2S audio:
117+
AudioFlinger.init(device_type=AudioFlinger.DEVICE_NULL)
124118

125119
# === LED HARDWARE ===
126120
# Note: Waveshare board has no NeoPixel LEDs
@@ -133,4 +127,4 @@ def adc_to_voltage(adc_value):
133127
# i2c_bus was created on line 75 for touch, reuse it for IMU
134128
SensorManager.init(i2c_bus, address=0x6B)
135129

136-
print("boot.py finished")
130+
print("waveshare_esp32_s3_touch_lcd_2.py finished")

0 commit comments

Comments
 (0)