bird-sanctuary / extended-dshot-telemetry Goto Github PK
View Code? Open in Web Editor NEWExtended DSHOT Telemetry (EDT) specification
License: GNU General Public License v3.0
Extended DSHOT Telemetry (EDT) specification
License: GNU General Public License v3.0
Some feedback:
IMHO, a flexible frame format, with minimal per-frame overhead, is required.
Perhaps one that uses a discovery, subscription, broadcast and request/response.
I detailed an example solution to this for the CRSF spec, here:
tbs-fpv/freedomtx#26 (comment)
A similar approach could be used for DSHOT telemetry.
The main limitation we have with dshot however is the amount of bits that can be sent in one dshot frame.
So perhaps instead of trying to pre-determine ALL the data that you'll ever need to send now, which you'll likely want to change in the future, maybe split the data over multiple frames.
e.g. FC says:
"I want value X at frequency Y," but say value X is a 16 bit value, so the ESC maybe sends 3 frames to get the data from the ESC to the FC at frequency Y.
001 0
+ iiiiiiii
-> 8 bit identifier010 0
+ hhhhhhhh
-> first 8 bits (msb first) of the 16 bit value.011 0
+ llllllll
-> last 8 bits of the 16 bit value.ESC vendors are then free argue/agree over assignment of 8-bit identifiers to data types. Due to the 8-bit identifier address space care must be taken to only allow good/sane/future-proof data types, part of the 8-bit identifier address space can be reserved for vendors (e.g. the last 32 identifiers. i.e. 223-255.
DShot commands can be added for discovery/subscription/request.
DSHOT TLM frames can be added for discovery response in the same way and sent as a response to a DSHOT discovery request.
1000 0
+ iiiiiiii
-> 8 bit identifier for 'Temperature'1000 0
+ iiiiiiii
-> 8 bit identifier for 'Voltage (Step size 0.25V)'1000 0
+ iiiiiiii
-> 8 bit identifier for 'Current (Step size 1A)'1000 0
+ iiiiiiii
-> 8 bit identifier for 'Debug 1'1000 0
+ iiiiiiii
-> 8 bit identifier for 'Debug 2'Subscription is a little trickier, as you would have to use a sequence of DSHOT commands, which could be repeated.
Something like:
DSHOT_EDT_SEQUENCE_BEGIN
DSHOT_MOTOR_0 + <8 bit sub-command>
, e.g. EDT_SUBCOMMAND_SUBSCRIBE
DSHOT_MOTOR_0 + <8 bit identifier of the data item>
DSHOT_MOTOR_0 + <16 bit encoded frequency/rate>
for the data item should be sent.DSHOT_EDT_SEQUENCE_END
Obviously, sending motor commands should not cause the motors to spin, so in-order to be backwards compatible the command sequence can only be sent if the FC knows that the ESC supports ETM. However, the FC will know this if the ESC responds to the DSHOT_EDT_DISCOVERY
command!
If you want the ESC to respond with a specific bit of data, when disarmed, e.g. for end-of-flight stats, then a dshot command sequence can be sent, as follows:
DSHOT_EDT_SEQUENCE_BEGIN
DSHOT_MOTOR_0 + <8 bit subcommand>
for EDT_SUBCOMMAND_REQUEST
DSHOT_MOTOR_0 + <8 bit identifier of the data item>
DSHOT_EDT_SEQUENCE_END
So the entire set of new DSHOT commands would be:
DSHOT_EDT_DISCOVERY
DSHOT_EDT_SEQUENCE_BEGIN
DSHOT_EDT_SEQUENCE_END
From above, the ETM frames used would be:
001 0
010 0
011 0
100 0
The initial EDT sequence sub commands needed are:
EDT_SUBCOMMAND_SUBSCRIBE = 0x00,
EDT_SUBCOMMAND_REQUEST = 0x01,
So with this, now you have a method for getting all the data you'll ever want, with no protocol changes ever needed, AND you still have 3 more EDT frames spare!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.