feat: upcoming support for tak and trafficmanagement configs, device hw#4671
Merged
Conversation
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>
# Conflicts: # core/resources/src/commonMain/composeResources/values/strings.xml
Codecov Report❌ Patch coverage is
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
device_hardware.jsonhardware list, each with distinct model information and partition schemes.TAK.kt, providing functions to map TAK teams and roles to string resources and colors.Settings navigation enhancements:
TrafficManagementConfigScreenandTAKConfigScreento the settings navigation, enabling these configuration screens in the app. [1] [2]Build and test improvements:
build.gradle.ktsfiles forcore/modelandcore/commonto enable android resources for host tests and add device test configuration, along with new dependencies for Android host and device tests. [1] [2] [3]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.