-
-
Notifications
You must be signed in to change notification settings - Fork 898
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
Fix battery status and optimize and fix status pull #3397
Conversation
This comment has been minimized.
This comment has been minimized.
AUTOMERGE: (FAIL)
|
@@ -311,7 +311,7 @@ MspHelper.prototype.process_data = function(dataHandler) { | |||
FC.ANALOG.rssi = data.readU16(); // 0-1023 | |||
FC.ANALOG.amperage = data.read16() / 100; // A | |||
FC.ANALOG.voltage = data.readU16() / 100; | |||
FC.ANALOG.last_received_timestamp = Date.now(); | |||
FC.ANALOG.last_received_timestamp = performance.now(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think performance.now()
is relative to the page load, while Date.now()
to the UNIX epoch. To be used by a timestamp is good to use the performance
one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double checked, both work, but performance.now() seems to be preferred.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replaced the GUI.timeout_add() - now the liveDataRefreshTimer
keeps running 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also now it runs perfectly all the time we can remove pulling from some tabs to optimize serial communication
This comment has been minimized.
This comment has been minimized.
b2f5e52
to
79031f5
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Rebased on master |
This comment has been minimized.
This comment has been minimized.
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Do you want to test this code? Here you have an automated build: |
@haslinghuis Great update, I really experience faster execution, well done |
LiveStatusUpdate stops intermittent. This PR fixes the update and removes duplicate status pulls optimizing (serial) communication.