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

DSHOT #3879

Merged
merged 5 commits into from Oct 20, 2018

Conversation

Projects
None yet
@digitalentity
Copy link
Member

commented Sep 22, 2018

Blocked by #3833

@digitalentity digitalentity added this to the 2.1 milestone Sep 22, 2018

@digitalentity digitalentity self-assigned this Sep 22, 2018

@digitalentity digitalentity referenced this pull request Sep 22, 2018

Closed

Add DSHOT support #1393

@digitalentity digitalentity force-pushed the de_dshot branch from 6ba7f55 to 51dff7c Sep 22, 2018

@stronnag

This comment has been minimized.

Copy link
Collaborator

commented Sep 29, 2018

Just for kicks (quiet here), I built this for MATEKF405, OPTIONS=USE_DHSOT set the protocol to DSHOT_600 (the ESCs support it) and tether tested it. Appears to work (motors run, response to inputs etc).

# get motor_pwm_protocol
motor_pwm_protocol = DSHOT600
Allowed values: STANDARD, ONESHOT125, ONESHOT42, MULTISHOT, BRUSHED, DSHOT150, DSHOT300, DSHOT600, DSHOT1200

Should it ??? Should I be so impressed ?

btw --- this a tricopter, another well known firmware had a lot of problems with DSHOT and servos (which is one reason why my non-navigation mini-tri flys iNav).

@digitalentity

This comment has been minimized.

Copy link
Member Author

commented Sep 29, 2018

@stronnag so DSHOT works on your precious Tri? Congratulations to all of us then! And many thanks for testing.

@stronnag

This comment has been minimized.

Copy link
Collaborator

commented Sep 29, 2018

This is small, less precious tri. But for me it's the definitive DSHOT test based on βF experience (which had a lot of problems with servos). Impressed, I'll try and fly it tomorrow.

@digitalentity

This comment has been minimized.

Copy link
Member Author

commented Sep 29, 2018

@stronnag you know I'm most of the time in for backwards compatibility, that's why DSHOT will only be enabled for the targets where it would be able to coexist with servos.

Code still needs a lot of improvements - currently throttle mapping to DSHOT values is rather hacky, the whole mixer should be refactored to do it properly.

But still - I'm so much happy that it worked for you. I don't have any DSHOT-capable ESCs yet (a few on the way) so your's test is actually the first test with real ESCs 😄

@TwoToneEddy

This comment has been minimized.

Copy link

commented Sep 30, 2018

A friend of mine has just tested this on the omnibusf4v3 target and it looks good. I just added the USE_DSHOT to the target file but this results in only being able to use dshot from the cli, is this correct? Does the configurator need updating?

@digitalentity

This comment has been minimized.

Copy link
Member Author

commented Sep 30, 2018

@TwoToneEddy

This comment has been minimized.

Copy link

commented Sep 30, 2018

Just a note, the guy who tested dshot had the motors spinning fine, hence my initial conclusion that it looks good but after flying he found the wing he was using started rolling out of control. Not sure if it's related, feel bad as he's destroyed his goblin! Could be something else that caused it. Once it's fixed I'll see if he can get a black box log. Has anyone actually flown with this branch yet?

@stronnag

This comment has been minimized.

Copy link
Collaborator

commented Sep 30, 2018

I flew this on my small (semi-precious) tricopter today.

  • MATEK F405
  • Speedix 25A blheli-s ESCs
  • DSHOT600

Flew just fine, no problems at all. Identical performance to the same machine on MULTISHOT :)

This branch plus the janitorial "add string.h for memset" PR #3894

@teckel12

This comment has been minimized.

Copy link
Contributor

commented Sep 30, 2018

Identical performance to the same machine on MULTISHOT :)

"Identical"? How can that be? It's digital! It must be better! 😄

@stronnag

This comment has been minimized.

Copy link
Collaborator

commented Sep 30, 2018

Identical performance to the same machine on MULTISHOT :)

"Identical"? How can that be? It's digital! It must be better! 

Identical within the limits of my flying ability. It's not a high bar. I'm sure the experts will correct the heretical errors of my ways. OK, I was being deliberately provocative ... but I can't tell any difference.

@teckel12

This comment has been minimized.

Copy link
Contributor

commented Sep 30, 2018

I think technically, MULTISHOT is faster than DSHOT600 more than 50% of the time, but it's digital, so the math must be wrong.

@digitalentity

This comment has been minimized.

Copy link
Member Author

commented Sep 30, 2018

I think practically. Quad takes >10ms to even start responding to roll/pitch command (that's measured on a live quad). Microseconds of ESC command delay are way beyond measurement error here. The only benefit is zero distortion of ESC command, but it comes at a price of higher requirements to wiring quality.

I would like to see received PER (packet error rate) calculated by ESC firmware and reported via telemetry. This way DSHOT reliability would be measurable.

@teckel12

This comment has been minimized.

Copy link
Contributor

commented Sep 30, 2018

In any case... I do have a quad with ESCs that support DSHOT which I will also test. I'll do everything in my power to contain my enthusiasm. I hope it will be more successful than when I tested Oneshot 125 and one ESC stuck the motor at 100%. BTW, a quad doesn't like it when one motor goes from 30% to sticking at 100%. It was spectacular from 100 feet, spun the battery clean off.

@TwoToneEddy

This comment has been minimized.

Copy link

commented Oct 1, 2018

I didn't add the string.h to pwm_output.c. What are the implications of that? It built fine.

@stronnag

This comment has been minimized.

Copy link
Collaborator

commented Oct 1, 2018

Just compiler warnings, I expect.

@TwoToneEddy

This comment has been minimized.

Copy link

commented Oct 1, 2018

My friend who test dshot also said "Just tested it, it works no problem. The accuracy of low throttle on my nano goblin is much improved as it is on quads with dshot." That was before it went into a strange infinite roll

@teckel12

This comment has been minimized.

Copy link
Contributor

commented Oct 1, 2018

@TwoToneEddy Are you saying the INAV build with DSHOT enabled caused an infinite roll? If so, that's exactly what happened to me when testing Oneshot 125 (motor stuck at 100%).

@TwoToneEddy

This comment has been minimized.

Copy link

commented Oct 1, 2018

@teckel12 I'm not sure as i didn't do the tests personally, it was a friend of mine but from what they tell me yes. It's strange though as the motor (on a wing) responded fine in the motors tab which sounds like the protocol was working fine.

Apparently the flight controller is also dead now (no lights). Perhaps the flight controller was on the way out? Don't know

@stronnag

This comment has been minimized.

Copy link
Collaborator

commented Oct 1, 2018

I'm a bit less convinced about this new timer / dma stuff. I flew 'cecil the deadcat', Omnibus F3 with MULTISHOT on it today. On the second lipo, blackbox gave up 1.5 min in to a 6.5 min flight which ended in a violent roll of death from 15m up, effectively writing off the machine. Frame broken beyond even the epoxy doctor's best magic, one motor and three props destroyed. Still, this is the first aircraft I've totalled in nearly three years of extreme iNav testing, c'est la vie. RIP cecil, you really are a dead cat now.

@digitalentity

This comment has been minimized.

Copy link
Member Author

commented Oct 1, 2018

@stronnag SD-card based? Unplugged SD-card in-flight might have resulted in an FC freeze - known issue, no fix at the moment 😞

@stronnag

This comment has been minimized.

Copy link
Collaborator

commented Oct 1, 2018

yes, it was SDcard based. Sh*t happens, I know that better than most.

@digitalentity

This comment has been minimized.

Copy link
Member Author

commented Oct 1, 2018

Yep, that SD-card issue definitely needs fixing. SD-card reliability is the main reason I prefer dataflash FCs

@stronnag

This comment has been minimized.

Copy link
Collaborator

commented Oct 1, 2018

Indeed, I really liked the QVF4 .... apart from the 2Mb flash.

@giacomo892

This comment has been minimized.

Copy link
Collaborator

commented Oct 1, 2018

@stronnag just for the record, which sdcard were you using? see #3824 . I've also had some runaways this summer while logging was enabled.

@stronnag

This comment has been minimized.

Copy link
Collaborator

commented Oct 1, 2018

It was a Transcend Ultimate (can't read the writing on it any more) that I've been using since we got SD logging.

Anyway, as I've recently become addicted to self built foamie parkjets, the remaining motors /ESCs will not be lacking a new home.

@Redshifft

This comment has been minimized.

Copy link

commented Oct 2, 2018

Unplugged SD-card in-flight might have resulted in an FC freeze - known issue, no fix at the moment 😞

Wow, that's a few steps up from very serious given the reliability of SDcards :(

@OlivierC-FR

This comment has been minimized.

Copy link
Contributor

commented Oct 19, 2018

Flew DSHOT (300) yesterday, was perfect, no issue, no desync.
5" quad, Matek F405-CTR, ESC are Racerstar RS30A Lite running last BLHeli_S version.

@digitalentity

This comment has been minimized.

Copy link
Member Author

commented Oct 20, 2018

Ok, I think this is save to merge. Further improvements would be done in separate PRs

@digitalentity digitalentity merged commit db73881 into development Oct 20, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@digitalentity digitalentity deleted the de_dshot branch Oct 20, 2018

@Hanni1312

This comment has been minimized.

Copy link

commented Oct 23, 2018

Quick question, is d-shot telemetry included in this?

@teckel12

This comment has been minimized.

Copy link
Contributor

commented Oct 23, 2018

@Hanni1312 No, just communicating to the ESCs via the DSHOT protocol, not telemetry.

@bigdaddy5414

This comment has been minimized.

Copy link

commented Dec 3, 2018

I compiled 2.1 development last night to get my OSD working which it does no problem on my OMNIBUSF7NXT. I just tried to enable DSHOT from here and the FC stops connecting to USB, just comes up as a malfunctioning USB device and I don't get the motor arming beeps. And yes the 4in1 esc is blheli32, dshot is fine under betaflight.

# get motor_pwm_protocol motor_pwm_protocol = STANDARD Allowed values: STANDARD, ONESHOT125, ONESHOT42, MULTISHOT, BRUSHED, DSHOT150, DSHOT300, DSHOT600, DSHOT1200

set motor_pwm_protocol = DSHOT1200 seems to break it, don't know if I am missing something.

@silenec

This comment has been minimized.

Copy link

commented Mar 26, 2019

Is there any way to adjust the idle (dshot_idle_value) like in Betaflight? My motor spins too fast at minimum throttle. edit: ok digitalIdleOffsetValue in mixer.c did the trick.

@owengrey

This comment has been minimized.

Copy link

commented Apr 21, 2019

Hi All,
How can I enable DSHOT150 on my omnibusF7 V2. I have been using dshot150 with betaflight and cleanflight with no issue. I have a little 5" quad (robocat) which flies like on rails but I have a much larger hex camera ship so I use little robocat for reccying the area before I fly my filming quad. Anyhow,
I see in the gui dshot150 but that doesnt stay selected and have tried to use set motor_pwm_protocol = DSHOT150 in cli but again it doesnt stay set. I guess its been disabled in my inav (latest) version for omnibusf7v2. I dont mind being another test pilot for dshot. How do I go about enabling it for my FC?
I will have a go at most things so any advice will be most appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.