Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save and reload telemetry values in companion telemetry simulator #1954

Merged
merged 3 commits into from
Jun 15, 2022

Conversation

dwheeld
Copy link
Contributor

@dwheeld dwheeld commented May 11, 2022

Added a method for users to save and reload Companion Simulator Values that they have entered. Also, added defaults to all of the sensors.

When using Companion Telemetry Simulator, the user can enter values for each sensor. These values can be used to test things like low voltage alarms, etc. At this time, the values must be entered manually each time the telemetry simulator is started. If he leaves the simulator to edit these alarms, and then re-starts the simulator, he must enter the sensor values again after the telemetry simulator re-starts. My addition allows the user to save these values to a file. After re-starting the simulator he simply reloads the previously saved values.

Also, most of the telemetry simulator sensors do not have a default value. I have entered these default values for all of the sensors.

@pfeerick pfeerick linked an issue May 11, 2022 that may be closed by this pull request
1 task
@pfeerick pfeerick added enhancement ✨ New feature or request companion Related to the companion software labels May 11, 2022
@pfeerick pfeerick requested a review from elecpower June 4, 2022 01:37
@dwheeld
Copy link
Contributor Author

dwheeld commented Jun 8, 2022

@elecpower

Thank you. The changes you suggested have been made.

@dwheeld
Copy link
Contributor Author

dwheeld commented Jun 12, 2022

What more do I need to do to get this merged. I have finished all of the edits that were recommended.

@raphaelcoeffic
Copy link
Member

@dwheeld can you please rebase and get rid of the „Merged branch … into …”?

@dwheeld
Copy link
Contributor Author

dwheeld commented Jun 12, 2022

@raphaelcoeffic

Thank you. I am not familiar with rebase, so will have to do some searching to learn what it means and how to use it.

@raphaelcoeffic
Copy link
Member

@raphaelcoeffic

Thank you. I am not familiar with rebase, so will have to do some searching to learn what it means and how to use it.

In case you’re not sure remember to create a backup branch with the current state. If you fail, just ping me and I’ll have a shot at it (will need permission on your repo ;-)).

@dwheeld
Copy link
Contributor Author

dwheeld commented Jun 12, 2022

@raphaelcoeffic

git informs me that my local files are behind the remote branch.

So, I need to do a git pull, followed by a git rebase, followed by a git push.

Does this look correct?

$ git checkout main

Your branch is behind 'origin/main' by 312 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)

d_w_h@ADMINIS-1VA9V6D MINGW64 ~/edge local (main)

$ git pull

$ git rebase

$ git push

@raphaelcoeffic
Copy link
Member

raphaelcoeffic commented Jun 12, 2022

@dwheeld You actually want to have this:

$ git fetch
$ git pull --rebase

The last can be made a default setting, so that it will automatically rebase instead of merge when you git pull (see https://mislav.net/2013/02/merge-vs-rebase/).

I just rebased it for you. So now you should:

$ git fetch
$ git reset --hard origin/main

This assumes that origin points to your repo, not the main EdgeTX repo. Otherwise you'll have to change the name of the remote (origin).

dwheeld added 3 commits June 13, 2022 00:10
…elemetry simulator. Also, default values set for all sensor values.
Signed-off-by: dale wheeler <dale@wheeler.net>
@dwheeld
Copy link
Contributor Author

dwheeld commented Jun 12, 2022

@raphaelcoeffic

Done

@dwheeld
Copy link
Contributor Author

dwheeld commented Jun 12, 2022

fetch upstream

It appears that in the future, I should not use the "Fetch upstream" button to stay up-to-date. What is the correct way to do so?

@pfeerick
Copy link
Member

Using fetch upstream is not a problem, when used correctly. Normally you would not be adding stuff in your main branch - you would create a branch for your feature or bug commits. Then when you do the fetch upstream in your forks copy of main, it will do fast-forward merges, syncing your main with the upstream main without adding extra merge commits (they are only there because there are commits in your main that are not in the upstream main). You would then rebase your branch on main if it was out of sync.

@dwheeld
Copy link
Contributor Author

dwheeld commented Jun 14, 2022

All suggested edits have been made, branch was rebased, all checks passed, and the branch has no conflicts with the base branch.

What is required next to get the PR merged?

@raphaelcoeffic
Copy link
Member

What is required next to get the PR merged?

@elecpower needs to re-check and will accept if everything is ok.

@dwheeld
Copy link
Contributor Author

dwheeld commented Jun 14, 2022

@elecpower

The changes you suggested have been completed.

Please approve this PR.

@dwheeld dwheeld changed the title Users will be able to save and reload telemetry values in companion t… Save and reload telemetry values in companion telemetry simulator Jun 14, 2022
@elecpower
Copy link
Collaborator

Approved

@raphaelcoeffic raphaelcoeffic merged commit 940d69f into EdgeTX:main Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
companion Related to the companion software enhancement ✨ New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a method to save and retrieve Companion Telemetry Simulator values
4 participants