-
Notifications
You must be signed in to change notification settings - Fork 16.6k
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
Bi-directional dshot on iomcu F103 8MHz #27087
Bi-directional dshot on iomcu F103 8MHz #27087
Conversation
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.
Very nice!
I think its better to put a hwdef.inc in iomcu-f103-dshot and then reference that from both places in order to avoid code duplication
I've just tested on Podman H7 flight controller, and everything is currently working as expected. |
Great! Still need the inc change |
bc64426
to
fb953e0
Compare
fb953e0
to
fc01232
Compare
@@ -0,0 +1,93 @@ | |||
# hw definition file for processing by chibios_pins.py | |||
|
|||
include ../iomcu/hwdef.inc |
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.
This needs to almost exactly match the old hwdef.dat. You have added a whole bunch of extra lines - please remove them
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.
This needs to almost exactly match the old hwdef.dat. You have added a whole bunch of extra lines - please remove them
remove them
|
||
include ../iomcu/hwdef.inc | ||
|
||
# defines to allow the loop timing to be observed with a Saleae |
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.
This should include iomcu-f103-dshot/hwdef.inc and almost all the lines should be deleted
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.
Nothing actually includes this so I don't think there is a need for another hwdef.inc - just use hwdef.dat
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.
You are right - just use hwdef.dat in iomcu-f103-8Mhz-dshot/hwdef.dat.
5a142b4
to
4d9347f
Compare
3f85a57
to
2e5b9df
Compare
I've fixed it for you - please check it |
I am currently attempting to test with an octocopter. |
04e0375
to
0a65cd6
Compare
The build script needed updating and I also needed to make sure that the binaries were compiled with the right compiler - so I have fixed this now. Please check it. |
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.
Commits now broken
You now need to squash and merge your commit into the other one |
I recently standardized the folder names to 8MHz, ensuring no compilation errors. Earlier issues arose due to inconsistent naming in the path folders, specifically "iomcu-f103-8Mhz-dshot". I addressed the Python file validation issue related to this, and now, I've resolved the root problem by renaming the folders to "iomcu-f103-8MHz-dshot". |
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.
You should change everything to use MHz, both to be consistent with the other directory and because that is the correct capitalisation
5398a0b
to
a94b388
Compare
a94b388
to
085e628
Compare
This time, my modifications were based on the latest master branch. I then compressed and merged all my commits into a single new commit. This branch is 1 commit ahead of master. |
Unluckily, my PR submission was merged ahead of today. |
7bbe7b2
to
a1c4476
Compare
You need to learn how to use git. I have redone the commits for you so that they have the right messages and are split appropriately. Please don't change anything now. I have also rebuilt the firmware so that it is using the right branch and compiler. |
a1c4476
to
5e72aea
Compare
Thank you very much, this is my first successful merge with Ardupilot's code, it's been a fantastic experience. |
This PR adds support for bdshot telemetry on iomcus using the F103 with 8Mhz. There is one limitation - only channels 1-4,7-8 support telemetry. It is not possible to support 5-6 as these share a DMA channel with the fast UART interconnect.
Support is built into the iomcu dshot variant so to use you simply need to set BRD_IO_DSHOT and supply the appropriate SERVO_BLH_BDMASK. ESC telemetry indexes are modified to reflect the fact that ESC's 1-4 and 7-8 can now provide telemetry.
EDT is working, so you can get temperature, current and voltage information from the ESCs using bdshot as well. To use set SERVO_DSHOT_ESC in the normal way.
The two binary files named "iofirmware_f103_8MHz_dshot_lowpolh.bin" and iofirmware_f103_8MHz_dshot_highpolh.bin" were compiled using Copter-4.5.2.