Skip to content

Profile and settings branch - #18

Merged
Aredarn merged 2 commits into
mainfrom
profile_and_settings_branch
Aug 4, 2026
Merged

Profile and settings branch#18
Aredarn merged 2 commits into
mainfrom
profile_and_settings_branch

Conversation

@Aredarn

@Aredarn Aredarn commented Aug 4, 2026

Copy link
Copy Markdown
Owner

No description provided.

Aredarn added 2 commits August 4, 2026 08:37
This commit significantly expands the GPS connectivity options by introducing support for Bluetooth Classic (SPP) alongside the existing WiFi (ESP32) and internal phone GPS providers. It also adds a testing mode for simulator redirection and implements GPS refresh rate controls.

**Key Changes:**

*   **`GpsManager.kt`:**
    *   Refactored to handle multiple `GpsProvider` types: `WIFI`, `BLUETOOTH`, and `PHONE_GPS`.
    *   Implemented logic to switch between providers, ensuring only the selected source is active.
    *   Added support for sending commands (like rate changes) to the active commandable provider.
    *   Introduced `confirmedRateHz` to track hardware-confirmed refresh rates.
*   **`MainActivity.kt`:**
    *   Initialized `BluetoothClassicClient` and implemented Bluetooth permission handling.
    *   Added persistent storage for GPS source, preferred refresh rate, and selected Bluetooth device using `SharedPreferences`.
    *   Implemented a "Test Simulator" redirect for WiFi connections, allowing the app to connect to a custom IP address for development/testing.
*   **`SettingsScreen.kt`:**
    *   Revamped the "Hardware & Sensors" section with new UI for selecting GPS sources.
    *   Added a Bluetooth device picker (dropdown) for paired devices.
    *   Added a "Test Simulator" toggle and IP address field for WiFi configuration.
    *   Introduced a GPS rate selector (5Hz to 25Hz) with a "confirmed" status indicator.
*   **`ESPTcpClient.kt`:**
    *   Implemented `CommandableGpsProvider` to support sending data to the ESP32.
    *   Added `updateTarget` to allow runtime redirection of the TCP connection without app restarts.
    *   Updated JSON processing to handle rate acknowledgments (`RATE_OK`) and errors from the firmware.
*   **`ESPConnectionTestScreen.kt`:**
    *   Updated the UI to display the current GPS source (WiFi, Bluetooth, or Phone).
    *   Added display for the confirmed refresh rate and the name of the paired Bluetooth device.
*   **Models & Data:**
    *   **`RawGPSData.kt`:** Added an optional `valid` boolean field.
    *   **`ESPDatabase.kt`:** Bumped database version to `4`.
    *   **`AndroidManifest.xml`:** Added necessary permissions for Bluetooth and `BLUETOOTH_CONNECT`.
*   **`BluetoothClassicClient.kt` (New - implied by manager changes):**
    *   Introduced to handle SPP communication with external Bluetooth GPS modules.
This commit implements a major refactor of the application's color palette, moving from multiple section-specific accents (`accentCyan`, `accentBlue`, `accentAmber`) to a unified `accent` and `accentMuted` system. The new theme is built on a specific 5-color palette, improving visual hierarchy and reducing UI noise across all screens.

**Key Changes:**

*   **`TrackProColors.kt` & `TrackProTheme.kt`:**
    *   Removed `accentCyan`, `accentBlue`, and `accentAmber`.
    *   Introduced `accent` (Yellow `#FEEA00` in dark mode), `onAccent` for high-contrast foregrounds, and `accentMuted` (Teal `#3C7A89`) for structural elements.
    *   Updated `DarkTrackProColors` and `LightTrackProColors` with the new interpolated color ramp.
    *   Mapped Material 3 color slots (`primary`, `secondary`, `tertiary`) to the single unified accent.
*   **Global UI Components:**
    *   Updated `AppTopBar`, `CircularProgressIndicator`, `PrimaryButton`, and `CustomTextField` across all screens to use the unified `accent`.
    *   Refined `AppCard` styling to use subtler border and background treatments for achieved states.
*   **Screens (`TrackScreen.kt`, `DragScreen.kt`, `TimeAttackScreen.kt`, etc.):**
    *   Replaced section-specific colors with `accent` or `accentMuted`.
    *   Standardized "View" buttons and loading indicators to use the primary accent.
    *   Updated `StatCell` to rely more on standard text colors rather than bright accents for better readability.
*   **Settings & Connectivity:**
    *   Updated `SettingsScreen.kt` to use `textMuted` for toggle values, reserving color for functional warnings (e.g., GPS rate mismatches).
    *   Updated `ESPConnectionTestScreen.kt` to use `deltaGood` for "Live" status and primary accent for data streams.
*   **Data Visualization (`LapDetailScreen.kt`):**
    *   Sourced `PRIMARY_COLOR` and `COMPARE_COLOR` for map traces from `DataVizColors` to ensure consistency with charts while maintaining distinct hues for overlaid data.
@Aredarn
Aredarn merged commit f7ab504 into main Aug 4, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant