Commit Graph

27 Commits

Author SHA1 Message Date
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
Thomas Farstrike d064636a2d DownloadManager: fix partial download progress reports
Use Content-Range in case of partial downloads.
2025-12-24 11:25:45 +01:00
Thomas Farstrike 51a5248d88 OSUpdate app: work towards fixing auto-resume 2025-12-24 11:11:49 +01:00
Thomas Farstrike 3915522bde WifiService: also auto connect to hidden networks 2025-12-19 16:01:06 +01:00
Thomas Farstrike 67592c7886 Move wifi busy logic to wifi service 2025-12-19 15:06:20 +01:00
Thomas Farstrike 73cba70d55 WiFi app: delegate to WiFiService where possible 2025-12-19 14:39:02 +01:00
Thomas Farstrike 23a8f92ea9 OSUpdate app: show download speed
DownloadManager: add support for download speed
2025-12-17 15:02:31 +01:00
Thomas Farstrike 5dd24090f4 Move download_url() to DownloadManager 2025-12-17 12:26:02 +01:00
Thomas Farstrike f4bd4d0a2b Improve wifi handling 2025-11-24 18:52:49 +01:00
Thomas Farstrike ce8b36e3a8 OSUpdate: pause when wifi goes away, then redownload 2025-11-24 18:03:02 +01:00
Thomas Farstrike df486a5a5d WifiService: connect to strongest networks first 2025-11-24 08:24:47 +01:00