Skip to content

feat: upcoming support for tak and trafficmanagement configs, device hw#4671

Merged
jamesarich merged 6 commits into
mainfrom
feat/newprotos
Feb 27, 2026
Merged

feat: upcoming support for tak and trafficmanagement configs, device hw#4671
jamesarich merged 6 commits into
mainfrom
feat/newprotos

Conversation

@jamesarich

Copy link
Copy Markdown
Collaborator

This pull request introduces new device hardware support, expands settings navigation, and adds TAK-related functionality, along with improvements to test coverage and build configuration. The most significant changes are grouped below:

Device hardware and TAK functionality:

  • Added three new LilyGo ESP32-S3 devices to the device_hardware.json hardware list, each with distinct model information and partition schemes.
  • Introduced TAK-related database model utilities in TAK.kt, providing functions to map TAK teams and roles to string resources and colors.

Settings navigation enhancements:

  • Added new imports and navigation routes for TrafficManagementConfigScreen and TAKConfigScreen to the settings navigation, enabling these configuration screens in the app. [1] [2]

Build and test improvements:

  • Updated build.gradle.kts files for core/model and core/common to enable android resources for host tests and add device test configuration, along with new dependencies for Android host and device tests. [1] [2] [3]
  • Migrated and improved test classes (CapabilitiesTest, DataPacketParcelTest, DataPacketTest, NodeInfoTest, PositionTest) to use more idiomatic assertions and expanded test coverage for device version parsing, TAK, and Traffic Management features. [1] [2] [3] [4] [5] [6] [7] [8] [9]

These changes collectively improve device support, add new features, and strengthen the codebase's reliability and maintainability.

This commit introduces configuration screens and logic for the Traffic Management and TAK (ATAK) modules, enabling advanced network control and team-based situational awareness settings.

Key changes include:
- **New Configuration Screens**: Added `TrafficManagementConfigScreen` and `TAKConfigScreen` to manage module-specific settings such as position deduplication, rate limiting, team colors, and member roles.
- **Firmware Capability Checks**: Updated `Capabilities` to verify support for Traffic Management (firmware v3.0.0+) and TAK configuration (firmware v2.7.19+).
- **Role-Based Navigation**: Refactored `ModuleRoute` and `RadioConfig` to filter available modules based on the device's role. For example, TAK settings are now only shown when the device is configured with a TAK-related role.
- **Enhanced UI Components**: Updated `DropDownPreference` to support color previews, allowing users to visually select TAK team colors.
- **Hardware Support**: Added definitions for new LilyGo hardware models, including the T5 S3 ePaper Pro, T-Beam BPF, and T-Mini E-paper S3 Kit.
- **Data Mapping**: Introduced utility functions to map TAK protocol buffers (Team and MemberRole) to localized string resources and Compose colors.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit optimizes the performance of firmware capability checks and version parsing by calculating values during initialization rather than on every property access.

Key changes include:
- Refactored `Capabilities` and `DeviceVersion` to use stored properties instead of custom getters, reducing redundant string parsing and integer calculations.
- Introduced static `DeviceVersion` constants for common firmware milestones (e.g., v2.6.x, v2.7.x, v3.0.0) to standardize comparisons.
- Added support for new capability checks: `supportsTrafficManagementConfig` (v3.0.0), `supportsTakConfig` (v2.7.19), and `supportsEsp32Ota` (v2.7.18).
- Optimized the `core:model` build configuration by disabling unused Android resources.
- Updated resource imports in the settings and database modules to support new TAK roles and Traffic Management configurations.
- Removed the deprecated `CapabilitiesTest.kt`.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit reorganizes the testing infrastructure in the `core:model` module to align with modern Android multiplatform testing patterns.

Specific changes include:
- **Test Migration**: Moved tests from `androidUnitTest` and `androidTest` to the newly configured `androidHostTest` and `androidDeviceTest` source sets.
- **Gradle Configuration**: Updated `build.gradle.kts` to enable `withHostTest` and `withDeviceTest` configurations. Added necessary testing dependencies including JUnit, Robolectric, and MockK.
- **Dependencies**: Added `androidx.core.ktx` to the `androidMain` source set.
- **Capabilities**: Introduced a new `CapabilitiesTest` in the `commonTest` source set to verify firmware-based feature flagging.
- **Refactoring**: Renamed the `NEVER` version constant to `UNRELEASED` in `Capabilities.kt` for improved clarity regarding pending features.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit cleans up the test suite in the `core` modules by consolidating host tests and standardizing assertion styles.

Key changes include:
- **Test Infrastructure**: Enabled Android resource inclusion for host tests in the `core:resources` and `core:common` modules via `withHostTest`.
- **Test Relocation**: Moved `CapabilitiesTest` from `commonTest` to `androidHostTest` within the `core:model` module.
- **Cleanup**: Removed several utility test files in `core:model` including `ExtensionsTest`, `SfppHasherTest`, `TimeExtensionsTest`, `UnitConversionsTest`, and `WireExtensionsTest`.
- **Code Style**: Standardized JUnit assertions across `PositionTest`, `DataPacketParcelTest`, `DataPacketTest`, and `NodeInfoTest` by fixing parameter ordering (expected vs actual) and removing redundant message strings.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
@github-actions github-actions Bot added the enhancement New feature or request label Feb 27, 2026
@jamesarich jamesarich enabled auto-merge February 27, 2026 17:30
# Conflicts:
#	core/resources/src/commonMain/composeResources/values/strings.xml
@codecov

codecov Bot commented Feb 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 15.35%. Comparing base (0a6fcc8) to head (f4fddf5).
⚠️ Report is 10 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...m/geeksville/mesh/navigation/SettingsNavigation.kt 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4671      +/-   ##
==========================================
- Coverage   15.36%   15.35%   -0.01%     
==========================================
  Files          83       83              
  Lines        4342     4344       +2     
  Branches      734      734              
==========================================
  Hits          667      667              
- Misses       3551     3553       +2     
  Partials      124      124              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jamesarich jamesarich added this pull request to the merge queue Feb 27, 2026
Merged via the queue into main with commit b2b21e1 Feb 27, 2026
7 of 8 checks passed
@jamesarich jamesarich deleted the feat/newprotos branch February 27, 2026 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant