Commit graph

1145 commits

Author SHA1 Message Date
Robert-0410
cd9167f19f
refactor: Node detail work (#1836) 2025-05-10 08:03:14 -05:00
Robert-0410
309ce27268
refactor(graphs): Missing iaq (#1752) 2025-05-08 10:31:07 -05:00
James Rich
cc88487500
chore: extract string resources for import and export config (#1822) 2025-05-05 18:20:49 -05:00
James Rich
9648d0af77
refactor: extract more hardcoded strings (#1814) 2025-05-01 19:05:32 -05:00
James Rich
e9588c74b4
refactor: Remove automatic short name generation from long name. (#1813) 2025-05-01 18:15:22 -05:00
James Rich
ace756b96a
fix (#1647): Satellite icon sizing 2025-04-29 15:45:31 -05:00
James Rich
9c51245003
refactor (i18n): extract string resources from config for translation (#1794) 2025-04-28 18:09:16 -05:00
James Rich
2a710ba85f
Fix: actually copy public key (#1793) 2025-04-28 14:57:15 -05:00
James Rich
1bd6173f9f
fix(#1787): handle unknown hardware details crash (#1789) 2025-04-26 19:37:49 -05:00
James Rich
53a8fd2579
feat: Add copy button to public/private key fields (#1782) 2025-04-25 16:39:35 -05:00
Joshua Soberg
edb514af64
Remove imePadding modifier to internal scaffold box (#1771) 2025-04-21 17:11:56 -05:00
James Rich
5d5a4938a2
fix: clear local DB after reset (#1746) 2025-04-21 13:52:41 -05:00
James Rich
b6876bba64
fix: disable editing of Public Key field (#1737) 2025-03-31 12:18:13 -05:00
James Rich
b20fb93e8f
fix: udp toggle display logic (#1728) 2025-03-27 20:40:25 -05:00
Robert-0410
5379f9dede
fix: use the appropriate min when scaling the barometric pressure data (#1719) 2025-03-27 20:27:30 -05:00
James Rich
a28dc377ae
fix: Handle node public key mismatch and show warning (#1720)
* Handle node public key mismatch and show warning

- Add a mismatchKey flag to Node and MessageTopBar to indicate a public key mismatch.
- Set the public key to a default error value (all zeros) when a node's public key changes.
- Display a warning in the MessageTopBar when a key mismatch is detected in PKC.
- Only clear all nodes when a different mynode number is present.

* feat: Add key mismatch detection to NodeInfoDao

This commit introduces a new feature to the `NodeInfoDao` that detects and handles public key mismatches for existing nodes.

-   A new function `upsertCheckKeyMatch` is added to `NodeInfoDao` that checks for public key changes when upserting a node. If a mismatch is detected, the public key is set to `ERROR_BYTE_STRING`, and a warning is logged.
- The function `upsertCheckKeyMatch` is used instead of `upsert` in `NodeRepository` and in `putAll` inside of `NodeInfoDao`.
-   A new test `testPkcMismatch` is added to `NodeInfoDaoTest` to verify the key mismatch detection.
- Changed `testNodes` to have unique public keys.
- Added `mismatchKey` state to the node model.

* detekt spacing

* Refactor: Correctly handle different node installations in NodeRepository

The logic for detecting different node installations in `NodeRepository.kt` was inverted, this commit fixes the logic to use `!=` instead of `==` to detect if the node number has changed.
2025-03-27 15:58:43 -05:00
todd2982
7902e21a4a
feat #1632: Accessibility updates (#1705)
* Add description for node sort option button

* Add description for location view button

* Update description for channel url copy button

* appease detekt

---------

Co-authored-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2025-03-23 20:26:28 -05:00
todd2982
123b296b6c
fix #1692: Clarify request options to exchange. (#1701) 2025-03-21 16:21:58 -05:00
James Rich
8a8ee27ad9
fix: Conditionally show UDP settings (#1702)
Only show UDP settings if the device has both Ethernet and WiFi.
2025-03-21 15:33:32 -05:00
Ken Piper
373cfe7838
feat: Add a bit more info to the node marker popup (#1691) 2025-03-19 10:02:58 -05:00
Robert-0410
e839c43542
feat: Graph Barometric Pressure (#1684)
* refactor: condensed the process of drawing the lines in the env metrics

* feat: only include iaq in the env metric graph when we have actual values

* feat: plotting barometric pressure when we have actual values

* detekt: spacing after (

---------

Co-authored-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2025-03-18 19:37:16 -05:00
James Rich
451be0b98c
feat #1688: Add UDP mesh toggle (#1689)
Adds a toggle to enable or disable mesh via UDP.
2025-03-18 18:44:39 -05:00
James Rich
8e5accd518
fix #1484: Filter out ignored nodes from map (#1676)
* fix #1484: Filter out ignored nodes from map

- Created a new `filteredNodeList` `StateFlow` in `UIState.kt` that filters out nodes marked as ignored.
- Updated `MapFragment.kt` to use `filteredNodeList` instead of `nodeList`, ensuring that ignored nodes are not displayed on the map.

* Refactor: Remove ExperimentalCoroutinesApi opt-in and add it to compiler args

- Removes the `@OptIn(ExperimentalCoroutinesApi::class)` annotation from multiple files.
- Adds `-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi` to the `freeCompilerArgs` in the `build.gradle` file, enabling the use of Experimental Coroutines API project-wide without the need for per-file opt-ins.
- The coroutine api is now applied globally.

Signed-off-by: James Rich <james.a.rich@gmail.com>

* detekt

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>

---------

Signed-off-by: James Rich <james.a.rich@gmail.com>
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2025-03-17 11:40:08 -05:00
Robert-0410
7189d44b9c
feat: Updated the env metrics graph to use the latest graph feature (#1667)
refactor: removed unused constants and function
2025-03-13 15:29:50 -05:00
James Rich
6dfb6a56d6
feat: expand role confirmation to include REPEATER (#1657)
* Clarify role change behavior

The role change logic was modified to show a confirmation dialog when the role is set to `ROUTER`, `ROUTER_CLIENT`, or `REPEATER`. Previously, the dialog was only displayed when setting the role to `ROUTER`.

* Implement router role confirmation dialog

- Added a confirmation dialog when changing the device role to ROUTER, ROUTER_CLIENT, or REPEATER.
- The confirmation dialog ensures users are aware of the implications of selecting a role used for infrastructure.
- Updated the logic to set the selected role only after confirmation.
- Only show dialog when changing to infrastructure roles.

* remove deprecated ROUTER_CLIENT to avoid confusion
2025-03-07 14:26:57 -06:00
James Rich
2859bed416
feat #1611: Add confirmation dialog when changing to router role (#1636)
* Add confirmation dialog for changing to router role

Introduced a confirmation dialog that will be shown when changing the device role to "router".
The confirmation dialog includes links to the "Device Role Documentation" and "Choosing The Right Device Role" blog post.
The user must check a checkbox to confirm.

* Update router role handling

Modified the handling of the router role in `DeviceConfigItemList.kt` to avoid returning prematurely from the `onItemSelected` lambda. This ensures that the role is updated properly when a user selects the "ROUTER" role.

* removes konami code check, remove testing code

* Refactor router role confirmation text

- Moves the router role confirmation text to strings.xml.
- Updates to use `AnnotatedString.fromHtml` instead of `buildAnnotatedString` and `withLink`.
- Changes from hard-coded strings to string resources.
2025-03-05 07:26:19 -06:00
Joshua Soberg
d8f67e011a
fix #1615: Add explicit signed int editing preference (#1629) 2025-03-02 09:20:27 -06:00
James Rich
1a11c3351b
Refactor NodeDetail.kt to use has*() functions (#1627)
Modified NodeDetail.kt to replace direct comparisons with 0f or 0 for sensor values with corresponding has*() functions.
This change improves code readability by clearly indicating the presence or absence of sensor data.
2025-03-02 06:12:07 -06:00
Joshua Soberg
ef64df3515
fix: Stop overriding surface/onSurface in theme (#1605)
Fixes #1604
* Stop overriding surface/onSurface in theme

* Wrap preview in AppTheme to get a better representation of what it'll look like on-device
2025-02-22 14:06:56 -06:00
Joshua Soberg
8fee9dbc45
fix: Accommodate large font for node filter (#1602)
Fixes #1561

* Add large font preview

* Adjust default min size such that the filter input will accomodate larger fonts. Also, align the dropdown icon and use body1 typography for input text

* Add license and newline to fix detekt issues
2025-02-22 12:57:30 -06:00
Robert-0410
85d6e0ccdf
feat: Graphs Blue Color (#1597)
* Changed the humidity color on the graph to the same blue used for current in the power graph.

* Refactor: Centralized the blue used in both the Env and Pow metrics in CommonCharts.kt.

---------

Co-authored-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2025-02-22 09:39:46 -06:00
Joshua Soberg
5430169830
Add an animation to user node list items to animate on details expansion (#1590) 2025-02-16 14:37:49 -06:00
Joshua Soberg
ed52a5360f
Apply a background to the filter search sticket header so that list items don't show behind it when scrolling (#1588) 2025-02-16 10:22:06 -06:00
Joshua Soberg
37489604f0
Introduction of stable Compose UI State and some simple animations in Debug Panel (#1575)
* Add dependency to KotlinX immutable collections

* Build a Compose-stable UI state vs using a database model. Move appropriate mapping logic for converting database model -> UI state into the view model. Introduce animations to new log placement and automated scroll.

* Center the top card row vertically

* Move log message generation into separate method

---------

Co-authored-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2025-02-16 06:09:41 -06:00
Ken Piper
e15ad23c46
feat: Initial implementation of adding nodes to favorites (#1520)
* Implement initial support for adding and removing nodes from favorites

* Make favorite nodes' names show up bold in the node list

* Forgot to add this here when I was fixing the previous merge conflicts. Whoops!

* Make detekt happy

---------

Co-authored-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2025-02-16 06:02:02 -06:00
James Rich
584fe8d6f8
fix: limit quick chat append, prevent duplicates (#1522)
Limits quick chat append to 200 characters and prevents duplicate appends.
Also sets a constant for the max message size.

fixes #1511
2025-02-16 05:51:54 -06:00
Robert-0410
b067a0c0b3
feat: Power graph (#1556)
* Refactor: We can draw the horizontal lines for the graphs independent of min and max entries.

* Added navigation to the PowerMetrics log with a skeleton screen.

* Drew channel 1 voltage.

* Refactor: Assigned colors for the data within the enum instead of a list-ordinal combo.

* Plotted Ch1 current line.

* Refactor: Did not need the parameters being used to get the desired ui in the TimeLabels composable.

* Added a row to help distinguish between units.

* Refactor: MetricsTimeSelector.kt to SlidingSelector.kt; the new version allows for generic options.

* Added a sliding selector to choose between power channels and changed the legend data to instead display current and voltage.

* We now plot the line for which the user has selected a power channel option.

* Don't need the current line to be dotted anymore.

* Don't think we need to display an info dialog for voltage and current.

* Wrote card to display the power channel data entries.

* detekt

* Refactor: current color change to accommodate the themes better

---------

Co-authored-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2025-02-15 22:37:05 -06:00
Ken Piper
86128a19c8 Add missing units to node details info cards 2025-02-15 22:07:49 -06:00
andrekir
a3a3958dfb refactor: move NavGraph to navigation package 2025-01-11 09:29:48 -03:00
andrekir
e196bfb683 refactor: encapsulate NodeDetail navigation 2025-01-11 09:29:48 -03:00
andrekir
0d5157eb36 refactor: extract Routeto navigation package 2025-01-11 09:29:48 -03:00
andrekir
ad9a3a5e49 refactor: move RadioConfig files to separate package 2025-01-11 08:02:54 -03:00
andrekir
7794c08190 refactor: replace Scaffold with internal component 2025-01-06 19:50:25 -03:00
andrekir
1c863f35f6 refactor: migrate ShareFragment to Compose 2025-01-06 19:16:40 -03:00
andrekir
0635b25e1c refactor: remove deprecated AppCompatTheme 2025-01-06 18:38:49 -03:00
andrekir
7bb0d424ad refactor: group power metrics by channel 2025-01-05 21:41:22 -03:00
andrekir
c1ca8f919d fix: switch preference bottom padding 2025-01-04 16:20:16 -03:00
andrekir
e73a67909a refactor: replace message chip with user avatar 2025-01-04 15:34:26 -03:00
Robert-0410
70a08c9d31
feat: Scrollable Signal Chart (#1505)
* Removed repeated calculation.

* Centralized the radius used to plot points and draw lines within GraphUtil.kt.

* Updated the signal metrics chart to use the scroll features.

* SignalMetricsChart long method warning suppression.
2025-01-03 09:02:32 -03:00
andrekir
5dcfe0e68a feat: add ROUTER_LATE role description 2025-01-02 08:05:40 -03:00