Exchange Position was sending exact position when channel settings were different #3805
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.
There was an issue I noticed with the Exchange Position functionality where it would send my exact position to the mesh when my position was disabled or when the precision was modified. I hadn't opened an issue as I already discovered where this is happening.
The issue
In the android app when the user activated the Exchange Position button, a POSITION_APP packet is generated and sent by the android app. This is different from the firmware which would have sent an imprecise position based on the precision setting of that channel or would not include position if disabled on the channel.
I replicated how the firmware generates POSITION_APP packets to ensure that this functions similarly.
Testing
After making the change I built and ran the app on my phone, connected to a node and set the primary channel precision to 13.

You can see that the position app with precision 13 was sent and I also received a response from the destination.
I then sent the request with position disabled on my primary channel.

You can see that the request was sent without the position and a response was received.
I ran the unit tests via android studio and ran the other gradle commands required by the contribution guide.