17 Commits

Author SHA1 Message Date
Thomas Farstrike 2a8f7c9860 Comments 2026-02-11 21:23:26 +01:00
Thomas Farstrike 81f17dd07e Settings app: make "Cancel" button more "ghosty" to discourage accidental misclicks 2026-01-26 11:53:00 +01:00
Thomas Farstrike 7b65ec7301 Simplify 2026-01-23 23:25:22 +01:00
Thomas Farstrike 68b6ff3886 Cleanup WidgetAnimator framework 2026-01-23 21:37:53 +01:00
Thomas Farstrike 86d9c38902 Introduce DisplayMetrics framework 2026-01-23 20:46:36 +01:00
Thomas Farstrike 30b3764710 Harmonize frameworks
All frameworks now follow the same singleton class pattern with class methods:

AudioFlinger (already had this pattern)
DownloadManager (refactored)
ConnectivityManager (refactored)
CameraManager (refactored)
SensorManager (refactored)
Pattern Structure:

class FrameworkName:
    _initialized = False
    _instance_data = {}

    @classmethod
    def init(cls, *args, **kwargs):
        """Initialize the framework"""
        cls._initialized = True
        # initialization logic

    @classmethod
    def is_available(cls):
        """Check if framework is available"""
        return cls._initialized

    @classmethod
    def method_name(cls, *args):
        """Framework methods as class methods"""
        # implementation

2. Standardized Imports in __init__.py
All frameworks are now imported consistently as classes:

from .content.package_manager import PackageManager
from .config import SharedPreferences
from .net.connectivity_manager import ConnectivityManager
from .net.wifi_service import WifiService
from .audio.audioflinger import AudioFlinger
from .net.download_manager import DownloadManager
from .task_manager import TaskManager
from .camera_manager import CameraManager
from .sensor_manager import SensorManager
3. Updated Board Initialization Files
Fixed imports in all board files to use the new class-based pattern:

linux.py
fri3d_2024.py
fri3d_2026.py
waveshare_esp32_s3_touch_lcd_2.py
4. Updated UI Components
Fixed topmenu.py to import SensorManager as a class instead of a module.

5. Benefits of This Harmonization
 Consistency: All frameworks follow the same pattern - no more mixing of module imports and class imports  Simplicity: Single, clear way to use frameworks - always as classes with class methods  Functionality: All frameworks work identically - init(), is_available(), and other methods are consistent  Maintainability: New developers see one pattern to follow across all frameworks  No Breaking Changes: Apps continue to work without modification (Quasi apps, Lightning Piggy, etc.)

6. Testing
All tests pass successfully, confirming:

Framework initialization works correctly
Board hardware detection functions properly
UI components render without errors
No regressions in existing functionality
The harmonization is complete and production-ready. All frameworks now provide a unified, predictable interface that's easy to understand and extend.
2026-01-23 15:31:47 +01:00
Thomas Farstrike bcfd941179 Always put Save button on the right 2026-01-14 21:58:51 +01:00
Thomas Farstrike 7170a60353 SettingActivity: add support for default_value 2026-01-14 21:13:49 +01:00
Thomas Farstrike c1ee9acc8a SettingActivity: don't show "Scan QR" button if no camera 2026-01-14 19:51:05 +01:00
Thomas Farstrike 4ad4e1ed20 Refactor to simplify imports 2026-01-13 00:38:17 +01:00
Thomas Farstrike 6f745d232b Rename CameraApp to CameraActivity 2026-01-12 22:58:09 +01:00
Thomas Farstrike 9c0b203dd9 SettingActivity: always show QR scan button for textarea 2026-01-11 22:05:08 +01:00
Thomas Farstrike 8b6bc338f1 SettingActivity: add QR scanning 2026-01-11 21:52:47 +01:00
Thomas Farstrike 4d058d7eb0 SettingActivity: fix textarea handling 2026-01-11 20:56:01 +01:00
Thomas Farstrike 9b99243f27 AppStore app: move AppDetail to its own file and simplify 2026-01-10 19:35:55 +01:00
Thomas Farstrike b4d851baad AppStore app: use generic SettingActivity to configure backend 2026-01-10 19:00:14 +01:00
Thomas Farstrike 29d3e8a2b9 Promote setting_activity from app to framework 2026-01-10 08:45:45 +01:00