34 Commits

Author SHA1 Message Date
Thomas Farstrike 7635c52baa Improve HowTo app 2026-03-18 13:33:07 +01:00
Thomas Farstrike 557520cafa Comments 2026-02-25 22:03:55 +01:00
Thomas Farstrike f358ed65ae Fix volume setting 2026-02-24 16:47:02 +01:00
Thomas Farstrike daa7125052 Rework AudioManager 2026-02-24 16:39:26 +01:00
Pavel Machek 4a9493ae7e imu: cleanup stale comments, revert unneccessary changes 2026-02-16 20:54:21 +01:00
Pavel Machek d6d3669309 imu: Allow access to iio on Linux
Linux phones have IMU units. Allow applications to use them same
way they would access IMU on esp32 based devices. Lightly tested
on PinePhone.

Same applications useful on esp32 (compass, step counter) are likely
to be useful on Linux phones, too.
2026-02-16 20:44:10 +01:00
Thomas Farstrike 82b116969f [UNTESTED] rework odroid into generic esp32 target 2026-02-13 15:29:25 +01:00
Thomas Farstrike 0aded1d58e OSUpdate app: improve style in portrait mode 2026-02-11 22:12:31 +01:00
Thomas Farstrike c2312ca0cb Launcher: smarter image width layout for portrait displays 2026-02-11 21:18:10 +01:00
Thomas Farstrike 9ef1cc8e7b CameraManager: support rotated cameras 2026-02-11 21:08:00 +01:00
Thomas Farstrike 0192c382da Wifi app: improve style on portrait displays 2026-02-11 20:05:01 +01:00
Thomas Farstrike bd9bdfc742 CameraActivity: improve overlay style for poster format 2026-02-11 11:47:28 +01:00
Thomas Farstrike 686feff554 CameraActivity: adapt to vertical layout 2026-02-11 11:35:34 +01:00
Thomas Farstrike bfd3804118 CameraActivity: make camera-independent 2026-02-10 19:17:02 +01:00
Thomas Farstrike 451a72a14e CameraManager: add resolution_to_framesize(width, height) 2026-02-10 12:58:47 +01:00
Thomas Farstrike 1f9eee3a9d Rename AudioFlinger to AudioManager framework 2026-01-26 13:13:54 +01:00
Thomas Farstrike d7e49d04dc Add new BatteryManager framework 2026-01-25 23:22:53 +01:00
Thomas Farstrike 8e734b1e53 InputManager: add has_indev_type to figure out if there are buttons 2026-01-25 21:52:25 +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 d42a8cde7b Linux: try camera before doing CameraManager.add_camera() 2026-01-14 19:50:18 +01:00
Thomas Farstrike d1ce153ca3 Add CameraManager framework 2026-01-14 19:16:19 +01:00
Thomas Farstrike 22f1202c7c Simplify AudioFlinger 2026-01-14 11:15:37 +01:00
Thomas Farstrike fd548d45f1 AudioFlinger framework: simplify import, use singleton class 2026-01-13 23:48:52 +01:00
Thomas Farstrike da9f912ab7 AudioFlinger: add support for I2S microphone recording to WAV 2025-12-17 21:49:51 +01:00
Thomas Farstrike afe8434bc7 AudioFlinger: eliminate thread by using TaskManager (asyncio)
Also simplify, and move all testing mocks to a dedicated file.
2025-12-17 17:03:42 +01:00