iNavFlight / inav

INAV: Navigation-enabled flight control software
https://inavflight.github.io
GNU General Public License v3.0
3.08k stars 1.46k forks source link

Add DSHOT support #1393

Closed Linjieqiang closed 5 years ago

Linjieqiang commented 7 years ago

Port from betaflight.

oleost commented 7 years ago

Any reason for closing this?

Dshot is more than just raw performance. It gives to possibility in future to use motor as buzzers, etc etc.

Should be on the to do list for INAV.

Linjieqiang commented 7 years ago

But I see DE is besy to deal with other problems so I choosed to close it.But I love to see dShot will be implemented in INAV project

fiam commented 6 years ago

I'm moving this issue to 2.0, since there seems no interest in implementing DSHOT soon. PRs for it are welcome at any time though.

Azuxul commented 6 years ago

Dshot implementation is important for BLheli32, without dshot we need to change throttle value and i dosen't found how to calibrate esc after. So for using inav with BLheli32 esc dshot is important.

Jeeper10A commented 6 years ago

Is Dshot in the works? I have a Matek f7 board and decided on betaflight or Inav. INAV will be my first choice but only if Dshot is implemented,

Azuxul commented 6 years ago

Currently Dshot doesn't work.

Blaster1920 commented 6 years ago

Any update on dshot1200 ?

Jhinta commented 6 years ago

+1 waiting for dshot

strepto42 commented 6 years ago

+1 please, it's 2018 now. DSHOT is not only really useful, it's not even new tech now

NeilGaede commented 6 years ago

+1

digitalentity commented 6 years ago

I see a lot of requests to add DHOT. Anybody want to have a crack at it?

turboworks commented 6 years ago

You gave me all the servos, thank You very much, please+1 DSHOT me as well...https://youtu.be/koOqenMpvck

avrahams commented 6 years ago

+1 and also esc telemetry

digitalentity commented 6 years ago

Will look into DSHOT after we get 2.0 out of the door

teckel12 commented 6 years ago

I wouldn't use DSHOT even it it was implemented, so I've got no motivation to add support. I feel there's too much potential risk with no gain over other more stable and tolerant protocols. But, there's a difference between a racing drone and a GPS navigation craft.

digitalentity commented 6 years ago

DSHOT support is more a marketing move than a real added value. For racing quads it might be worth it (although I doubt the real effect on flight performance would be different from effect of a placebo).

For bigger machines it will definitely do more harm than good since it's much more succeptible for poor wiring quality and EMI noise.

strepto42 commented 6 years ago

I have to disagree. Dshot eliminates the need to calibrate escs and provides a much more fault tolerant protocol for control. Poor wiring and so on will actually affect non-dshot quads more. My long range rig suffers from motor twitch badly using one shot, but flies perfectly using Dshot (which is why I switched it back to betaflight). I have great respect for contributors to open source and this project in particular but seriously, get with the program guys. Digital > analogue

digitalentity commented 6 years ago

On the wire DSHOT is analog. CRC checking masks issues by discarding corrupt packets and what is observed as "motor twitching" with OS125 with DSHOT will result in spontaneous stop of one motor at some point once too many packets are discarded.

teckel12 commented 6 years ago

@strepto42 Have you tried multishot? I've had issues with Oneshot early on with spontaneous full-throttle (of course to just one motor) which doesn't end well. Probably was an ESC issue, not INAV.

strepto42 commented 6 years ago

I agree that my issue is probably esc related. Still waiting for my spontaneous motor stop. Not gonna derail the thread further though. People want dshot, a tried and tested reliable protocol. The devs here can choose to implement it or not... There is no point arguing :-)

digitalentity commented 6 years ago

DSHOT will be implemented eventually, but mostly because it'a a "cool thing".

turboworks commented 6 years ago

ok, ok... so I was hoping for a fix ...https://youtu.be/ZF6K6MnojPg ...https://youtu.be/SqGlyGRRors

teckel12 commented 6 years ago

@turboworks Tried Multishot?

turboworks commented 6 years ago

been working with the older BL Heli with low kv motors... just hoping you guys that actually know what you are doing, will get these 32bit systems up and running, for us experimenters

teckel12 commented 6 years ago

I'm holding out for 64 bit ESCs, cause that means they're twice as good.

turboworks commented 6 years ago

live and learn

TwoToneEddy commented 6 years ago

As I see this feature request is open I've volunteered to look into this once the required timer has been added by digitalentity.

owengrey commented 6 years ago

On the wire DSHOT is analog. CRC checking masks issues by discarding corrupt packets and what is observed as "motor twitching" with OS125 with DSHOT will result in spontaneous stop of one motor at some point once too many packets are discarded.

This statement cant be true! you are mixing an analog answer mixed with a digital answer, It cant be both.... CRC checking cant be used with an analog signal.

When I get more time I will look into this as well. I am a research and developement engineer and have been designing industrial embedded controllers for many years. All software can be improved and that goes for communications between items also.

teckel12 commented 6 years ago

@owengrey On the wire it's analog, but it's converted to a digital signal on the ends, which then does the CRC check. This is a quite common "digital" communication technique.

digitalentity commented 6 years ago

We live in an analog world. There is no such thing as "digital signal", only "digital data" and "digital transmission" which means that binary data entering the transmitter is identical to binary data leaving the receiver. Even two logic elements connected by a simple wire operate voltage levels which they interpret as binary "1" and "0".

Same for DSHOT - it's a modulation technique to transmit a digital packet over analog wire. One largest drawback of digital transmission - it's usually all or nothing - communication works flawlessly even at very high levels of distortion. Beyond that it doesn't work at all.

RCnator commented 6 years ago

Pardon my lack of knowledge regarding IT etc but I hear about this timer and digitalentity wrote that he will "add a timer DMA framework after we release 2.0 (similar to what is there in Betaflight) - it will make adding dshot easier". What does that mean? Will we have dshot with 2.0.1 or will it be som kind of add on to 2.0?

digitalentity commented 6 years ago

@RCnator this means precisely what it means - another step of timer code refactoring in the development branch after release 2.0 goes public. It will make effort to add DSHOT easier but I have no idea when we'll have DSHOT implemented. Most likely next version, but no guarantees.

digitalentity commented 6 years ago

Ok, 2.0.0 almost out of the door. Time to start looking into DSHOT 😄

teckel12 commented 6 years ago

@digitalentity Please reconsider. Imagine the users we'll have if INAV includes DSHOT. 😵

digitalentity commented 6 years ago

I'm ok with closing "motors stopped in air" issues if reporter is using DSHOT 😈

teckel12 commented 6 years ago

Braces for DSHOT, the next SBUS disarm bug of 2018. Only difference is this time there's no fixing it.

TwoToneEddy commented 6 years ago

@digitalentity I'd love to look into this once the timer has been implemented. I'm literally moving house this weekend though so please don't wait for me if there's some urgency to get it in there for the next release. I know allot of pilots who will be thrilled at the addition of D-shot.

digitalentity commented 6 years ago

@TwoToneEddy I've started on TIM/DMA framework in #3833 (work in progress). Adding DSHOT on top of that should be fairly simple.

digitalentity commented 6 years ago

Also: I want DSHOT to be only available on targets where ALL motor outputs can support it. Otherwise firmware should automatically fallback to i.e. OS125. All DSHOT-related stuff should be guarded with define USE_DSHOT.

digitalentity commented 6 years ago

@teckel12 yes, we'll definitely see increase in bugreports. We'll figure out DSHOT policy once we have some statistics.

davidngrc commented 6 years ago

can't wait to test this, the next step will be esc telemetry, LOL

wx4cb commented 6 years ago

Any news on dshot support?

teckel12 commented 6 years ago

@wx4cb TwoToneEddy said he was planning on adding this once the timing stuff was added, which it has been. I'd ask TTE of the status.

TwoToneEddy commented 6 years ago

I fully intend to look into this but I've just moved house and don't even have an internet connection. Happy to do it but it won't be for a few weeks.

teckel12 commented 6 years ago

@TwoToneEddy You're doing it wrong. When I move, I get the Internet before anything. 😁

TwoToneEddy commented 6 years ago

@teckel12 Don't get me wrong, I fuming I don't have the internet yet, how am I supposed to make a cup of coffee

turboworks commented 6 years ago

dial-up?

digitalentity commented 6 years ago

No internet is really annoying. When I moved I got Internet even before the bed, table and microwave 😆

On topic: timer refactoring is in progress and I do it with DSHOT in mind - so adding DSHOT would be quite trivial.

Have a look at LEDSTRIP driver built on top of new timer framework https://github.com/iNavFlight/inav/blob/5ace4e6e59c3600bbe45dbd8ea9bf2ef1e17477a/src/main/drivers/light_ws2811strip.c - that's the complete driver, all low level hardware ops are done in timer code. DSHOT is very similar to LEDSTRIP protocol so implementation wouldn't be too different.

digitalentity commented 6 years ago

F7 implementation is clumsy and not tested yet. I kind of miss elegacy of ST's StdLib - HAL is true monstrosity. HAL_LL is much nicer, however amount of work to rewrite everything is huge (but eventually I might consider doing it anyway).

teckel12 commented 6 years ago

These days, the Internet comes before food, clothing and shelter, because what's the point without the Internet?