37 Commits

Author SHA1 Message Date
Thomas Farstrike a180adfe90 Improve hotspot state handling 2026-03-25 20:56:10 +01:00
Thomas Farstrike 5cd3d40440 Remove tests/base/* stuff to fix --ondevice tests 2026-03-25 16:51:10 +01:00
Thomas Farstrike b36ff9dcb9 WifiService: disable hotspot when connecting to access point 2026-03-25 15:45:48 +01:00
Thomas Farstrike fe9633b661 About app: add netmask separately 2026-03-24 13:35:12 +01:00
Thomas Farstrike c25e46c18b Tweak webserver_settings.py and wifi_service.py 2026-03-24 12:52:22 +01:00
Thomas Farstrike b3f84555c1 Simplify wifi_service.py 2026-03-18 13:00:41 +01:00
Thomas Farstrike f85c8daea8 Cleanups 2026-03-18 11:56:31 +01:00
Thomas Farstrike a0d4582815 Simplify Hotspot Settings 2026-03-18 09:43:20 +01:00
Thomas Farstrike e19a286ab5 Tweak HotspotSettings:
- show hotspot name + security in status
- hide password for none security
- hotspot enabled/disabled should NOT be persisted, only starts/stops the hotspot
2026-03-18 09:36:41 +01:00
Thomas Farstrike 5b50ce8528 Add Hotspot configuration 2026-03-17 15:17:38 +01:00
Thomas Farstrike 65f4a20c96 test_wifi_service: fix and speedup 2026-02-27 12:40:29 +01:00
Thomas Farstrike 5b8f612747 WifiService: print IP address on console after connecting 2026-02-26 21:43:24 +01:00
Thomas Farstrike cd95f55d02 DownloadManager: fix http, double chunk size for speed 2026-02-26 13:00:03 +01:00
Thomas Farstrike 0b2368464b WifiService: add functions for IP address 2026-02-18 18:12:11 +01:00
Thomas Farstrike 8c087a988f DownloadManager: make certificates explicit 2026-02-18 18:11:23 +01:00
Thomas Farstrike 06d64b7ac4 WifiService: less debug output 2026-02-13 11:09:03 +01:00
Thomas Farstrike 9a2a002bde Github workflow 2026-01-27 16:24:25 +01:00
Thomas Farstrike a50e3722c9 DownloadManager: don't share aiohttp.ClientSession
It seems to cause SSL/TLS session corruption on ESP32.

There is a performance impact, so maybe it should be reintroduced again later,
but for now, let's keep it simple and fix this bug.
2026-01-27 13:41:15 +01:00
Thomas Farstrike de7fb2b9fa Fix unit test 2026-01-23 17:19:12 +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 3f52960371 connectivity_manager.py: remove unused imports 2026-01-21 13:45:43 +01:00
Thomas Farstrike abbd8b7409 Comments 2026-01-21 13:44:52 +01:00
Thomas Farstrike 8fe21dbb73 Lazily import to help with testing 2026-01-13 00:56:34 +01:00
Thomas Farstrike 9db5c5e44c WiFi app: check "hidden" in EditNetwork 2025-12-24 17:24:08 +01:00
Thomas Farstrike b62e115613 DownloadManager cleanups 2025-12-24 14:23:10 +01:00