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
Added demag and stall events to edt status frame #12170
base: master
Are you sure you want to change the base?
Conversation
Updated EDT spec can be found here: https://github.com/bird-sanctuary/extended-dshot-telemetry/blob/main/README.md |
AUTOMERGE: (FAIL)
|
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.
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.
4f3f967
to
15e3dac
Compare
88a3750
to
87d76b9
Compare
rebase from master and continued testing please. followed back here from checking open Configurator PR's |
c64fd01
to
f07c366
Compare
// Update debug buffer | ||
if (motorIndex < motorCount && motorIndex < DEBUG16_VALUE_COUNT) { | ||
// Update debug buffer (motorIndex < motorCount guaranteed by caller) | ||
if (motorIndex < DEBUG16_VALUE_COUNT) { |
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.
Just grepping some code here.
#define DEBUG16_VALUE_COUNT 8
🤔 should we only update for motorCount
as some code seems dubious in how it uses the current amount of assigned motors:
for (int motorIndex = 0; motorIndex < MAX_SUPPORTED_MOTORS && motorIndex < motorCount; motorIndex++) {
Not letting motorCount exceed MAX_SUPPORTED_MOTORS would take out the first condition in several loops. This loop is used 11 times at minimum (in master)
Like to understand this statement as the if condition would not be needed:
// Update debug buffer (motorIndex < motorCount guaranteed by caller)
if (motorIndex < DEBUG16_VALUE_COUNT) {
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.
Daniel I think its best for all of us not to add this code to 4.5. It is very new, and there is a risk that we introduce issues. |
I understand your worries, but I am not sure I will be available in the following months to keep the code, so I would prefer to go for a revision process and add this feature during this version. After all the pr has been there for many months. |
bad button |
Fixed demag osd_warning Added fix for incorrect RPM debug values writtings in debug buffer Updated dshot status frame Added debug capabilities to dshot edt frames. DBG3 edt frame becomes demag metric frame DSHOT debug data packs 5 signals in a value. Added command to check debug data Added retries to activate EDT, because sometimes EDT is not successfully activated Added debug modes to be in sync between betaflight, betaflight-configurator and blackbox-explorer. Some of others will be deleted on future merge Added dshot_edt to MSP_MOTOR_CONFIG frame. Added dshot_edt setting to MSP_SET_MOTOR_CONFIG frame Removed debugging function added to cli. Fixed automated unit tests Added max demag metric warning to osd warnings Improved wording to make EDT firmware/hardware agnostic Merged to master Updated debug.c that was left behind during rebasing Fixed compilation bug. Reduce EDT enable commands to 1. Replaced literal by identifier to simplify edt enable response understanding Updated esc osd warnings to only notify errors. Warnings and alerts are stored in blackbox. Fixed dshot bitbang module for AT32 targets Fixed review findings
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.
A lot of code duplication in this PR. It needs some cleanup
This pr implements esc alert, warning and error events over edt. In the current commit these events are printed by console with the dshot_telemetry_info command and in the osd esc warning. A small rework has also been done to humanize the previous edt code so literals are replaced by macro identifiers.
The following Bluejay pr in the works with a branch that can be used this new functionality: bird-sanctuary/bluejay#64