- Posts: 3333
DSM Telemetry support
- vlad_vy
- Offline
Please Log in or Create an account to join the conversation.
- Indigo
- Offline
- Posts: 230
vlad_vy wrote: Telemetry.gps.velocity = float_to_int(&packet[1]); ??? Probably Telemetry.gps.velocity = float_to_int(&packet[7]);
Problem solved. New version 8fe505c has been uploaded to Test Builds.
Source
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
Please Log in or Create an account to join the conversation.
- Indigo
- Offline
- Posts: 230
PhracturedBlue wrote: I can't say that'll make me happy. Devo adn DSM and FrSky do not use the same format for telemetry. Converting to a common format makes the code more manageable and lets us use common functions everywhere. Storing GPS data differently for different protocols will likely add more code into the main body of deviation, and will certainly make adding new protocols more complicated.
I also don't think you'll save very much at the protocol level. there are likely better places to spend optimization effort. I'd start by looking at the disassembly for the dsm protocol and figure out which functions are largest.
Prove me wrong
I believe I can make it fit. The common format will be DSM's raw format which could be displayed using printf("%x") or at least the data conversion done within each protocols telemetry value handling code where each protocol can have it's own display code and code to convert to common value format... but that will take time...
So I don't hold things up, I have restored almost all GPS support to Devo7e (excludes GPS Time).
Pull Request and Source
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
Please Log in or Create an account to join the conversation.
- Indigo
- Offline
- Posts: 230
The advantage of combining the 2 x Devo callbacks is being able to turn telemetry on/off without having to rebind. For example you are flying with telemetry off and you suspect radio interference problem so you quickly land aircraft and then switch telemetry on to retrieve telemetry data and review it.
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
Please Log in or Create an account to join the conversation.
- Indigo
- Offline
- Posts: 230
Special thanks to: vlad_vy, Thomas.Heiss, Kernowmcrae, linux-user, cmpang, mwm and anyone else who has spent time testing my telemetry updates and providing feedback. I couldn't have done it without you guys.
Final test version fd018d1 has been uploaded to Test Builds.
Link to download page:
[Indigo]Devo/DSMx Telemetry Updates
Source
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
Can you try changed version CYRF_RxPacketIsGood(u8 len)? With forced buffer clean-up in case any errors. It works fine.
www.deviationtx.com/forum/protocol-devel...etry?start=340#31611
Please Log in or Create an account to join the conversation.
- Indigo
- Offline
- Posts: 230
deviationtx.com/forum/protocol-developme...etry?start=340#31646
I will create a new build with it shortly...
Please Log in or Create an account to join the conversation.
- Indigo
- Offline
- Posts: 230
Link to download page:
[Indigo]Devo/DSMx Telemetry Updates
Source
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
Please Log in or Create an account to join the conversation.
- Indigo
- Offline
- Posts: 230
And if that doesn't work I'll change it to if (length == 0), length = 16;
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
Please Log in or Create an account to join the conversation.
- Indigo
- Offline
- Posts: 230
I'll post again when ready...
Please Log in or Create an account to join the conversation.
- Indigo
- Offline
- Posts: 230
I'll continue testing this new version...
Edit: looks like it needss further improvement
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
Please Log in or Create an account to join the conversation.
- Indigo
- Offline
- Posts: 230
vlad_vy wrote: Indigo, build fd018d1 has problem, at least with Devo protocol, periodical connection lost. I think your problem can be found at CYRF_ReadDataPacketLen(u8 dpbuffer[], u8 len). Do not try empty whole buffer (16 bytes), but read received number of bytes only. Otherwise something (CYRF?) hung for a long time.
Can you try changed version CYRF_RxPacketIsGood(u8 len)? With forced buffer clean-up in case any errors. It works fine.
www.deviationtx.com/forum/protocol-devel...etry?start=340#31611
Thanks, new revised version -- updated to include an exit paramter to signal end receiving (buffer clean-up time):
www.deviationtx.com/forum/protocol-devel...etry?start=340#31678
Updated build 342e9de with it has been uploaded to Test Builds
Please Log in or Create an account to join the conversation.
- Home
- Forum
- Development
- Protocol Development
- DSM Telemetry support