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

Speedybee f405wing with bidirectional dshot #28070

Closed

Conversation

setupfpv
Copy link

No description provided.

setupfpv and others added 4 commits September 10, 2024 18:54
you can get the data of the esc temperature and rmp using bidirectional-dshot on Bluejay firmware.
Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be copying all of the non-bdshot variant sideways - use the include mechanisms to re-use the existing board.

No need to copy the documentation.

Check the MatekF765-Wing-bdshot as an example of what this PR should look like.

Also please note that this should be a single commit with a title of something like,:

hwdef: create SpeedyBeeF405-bdshot variant

@setupfpv
Copy link
Author

ok, but it's compiling and working )

Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Close now.

Please note that this should be a single commit.

We have a document here on how to clean up the commits to a mergeable state: https://ardupilot.org/dev/docs/git-interactive-rebase.html

If you don't feel confident doing those cleanup, just let me know and I'll do them before merge.

Comment on lines 1 to 8
# WS2812 LED
NTF_LED_LEN,4
SERVO12_FUNCTION,120

#Serial Port defaults
SERIAL1_PROTOCOL 23
SERIAL4_PROTOCOL -1
SERIAL6_PROTOCOL 2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# WS2812 LED
NTF_LED_LEN,4
SERVO12_FUNCTION,120
#Serial Port defaults
SERIAL1_PROTOCOL 23
SERIAL4_PROTOCOL -1
SERIAL6_PROTOCOL 2
@include ../SpeedyBeeF405WING/defaults.parm

Comment on lines 1 to 4
# hw definition file for processing by chibios_pins.py
# for SpeedyBeeF405WING bootloader

include ../SpeedyBeeF405WING/hwdef-bl.dat
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this file and the compiled bootloader (you've done well in this PR if you were creating an entirely new board, BTW - but you're not :-)

@@ -0,0 +1,10 @@
# Bi-directional dshot version of SpeedyBeeF405WING

include ../SpeedyBeeF405WING/hwdef.dat
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
include ../SpeedyBeeF405WING/hwdef.dat
include ../SpeedyBeeF405WING/hwdef.dat
USE_BOOTLOADER_FROM_BOARD SpeedyBeeF405WING

@peterbarker
Copy link
Contributor

ok, but it's compiling and working )

Sure. But you do realise "it compiles, ship it!" was a meme back in the day, right? :-)

Copy link
Collaborator

@andyp1per andyp1per left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some changes needed. Henry will want the README updated to include mention of the channels that use bdshot.

Why the -bd suffix? Our convention is -bdshot currently.

SERIAL4_PROTOCOL -1
SERIAL6_PROTOCOL 2

#dshot-bidir
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you should be setting any of these. This could be used on a quadplane, etc, etc. Best to let the user configure them.

include ../SpeedyBeeF405WING/hwdef.dat
undef PB6 PB0 PC8 PC9

PB6 TIM4_CH1 TIM4 PWM(2) GPIO(51) BIDIR
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you check the DMA allocation here?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell you don't lose anything with this config so why not just support it in the main firmware?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

absolutely...should be a change to the existing hwdef instead of new target

Copy link
Author

@setupfpv setupfpv Sep 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because i send to speedebee a version of the firmware for them, and also a modified source code for their target. and they answered month ago "..We have scheduled the testing of this target for next week. Following the successful completion of these tests, we intend to submit the target to the ArduPilot developers for approval.." and as a result, a month passed, no movement. Every time I download the source code of a stable new version, compile the firmware, and post it in my group (and as I understand, people using it), I got tired of it, it’s easier to have the ability to update via MP right away.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you check the DMA allocation here?

as an example I took an almost complete copy of matek405wing-bdshot
and there was:

# Bi-directional dshot version of MatekF405

include ../MatekF405-Wing/hwdef.dat

undef PB7 PB6 PB0 PB1 PC8 PC9

PB7  TIM4_CH2  TIM4 PWM(1) GPIO(50)
PB6  TIM4_CH1  TIM4 PWM(2) GPIO(51) BIDIR
PB0  TIM3_CH3  TIM3 PWM(3) GPIO(52) BIDIR
PB1  TIM3_CH4  TIM3 PWM(4) GPIO(53)

# Can only do bdshot on M1-4, so give up DMA channel on M5/M6 to get full DMA on USART3
PC8  TIM8_CH3  TIM8 PWM(5) GPIO(54) NODMA
PC9  TIM8_CH4  TIM8 PWM(6) GPIO(55) NODMA

DMA_NOSHARE TIM3_UP

@Hwurzburg Hwurzburg added the WikiNeeded needs wiki update label Sep 11, 2024
include ../SpeedyBeeF405WING/hwdef.dat
undef PB6 PB0 PC8 PC9

PB6 TIM4_CH1 TIM4 PWM(2) GPIO(51) BIDIR
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

absolutely...should be a change to the existing hwdef instead of new target

@setupfpv
Copy link
Author

Thanks guys for helping. Also thanks, now I understand how to use GitHub to add changes to different projects))

@setupfpv
Copy link
Author

Some changes needed. Henry will want the README updated to include mention of the channels that use bdshot.

Why the -bd suffix? Our convention is -bdshot currently.

When compiling, it was error something about long name.

@setupfpv setupfpv closed this Sep 11, 2024
@setupfpv setupfpv deleted the SpeedyBeeF405WING-with-bd-shot branch September 11, 2024 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WikiNeeded needs wiki update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants