You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
Simplify
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import lvgl as lv
|
||||
|
||||
from mpos.apps import Intent
|
||||
from mpos import PackageManager, SettingActivity, SettingsActivity
|
||||
import mpos.config
|
||||
@@ -10,9 +11,10 @@ from check_imu_calibration import CheckIMUCalibrationActivity
|
||||
|
||||
# Used to list and edit all settings:
|
||||
class Settings(SettingsActivity):
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.prefs = None
|
||||
self.prefs = mpos.config.SharedPreferences("com.micropythonos.settings")
|
||||
theme_colors = [
|
||||
("Aqua Blue", "00ffff"),
|
||||
("Bitcoin Orange", "f0a010"),
|
||||
@@ -56,11 +58,6 @@ class Settings(SettingsActivity):
|
||||
# Maybe also add font size (but ideally then all fonts should scale up/down)
|
||||
]
|
||||
|
||||
def onCreate(self):
|
||||
if not self.prefs:
|
||||
self.prefs = mpos.config.SharedPreferences("com.micropythonos.settings")
|
||||
super().onCreate()
|
||||
|
||||
# Change handlers:
|
||||
def reset_into_bootloader(self, new_value):
|
||||
if new_value is not "bootloader":
|
||||
|
||||
Reference in New Issue
Block a user