-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Telemetry functions #931
Telemetry functions #931
Conversation
- update messages generator - generic device with uart support - initial support of pprz protocol (transparant) - fix types in downlink variables
- actually, w5100 is only a device using pprz protocol - compiling but not tested - very strange manipulation of pointers in w5100_receive and w5100_read_data functions - I doubt this is actually still working...
Conflicts: sw/airborne/subsystems/gps.c
Nice! But regarding the style and naming I noticed some things:
|
Most of the peripherals structure are using the CamelCase, but mcu_periph and datalink stuff are more C style, that's why I did it like this. I don't mind changing if we set the coding style to CamelCase (although it doesn't seems to be recommended for C codes in the coding style I found). For the name, I prefer LinkDevice since it not meant to be only downlink but also uplink, logging, inter-mcu/cpu com,... So: |
Yeah, not sure what style makes more sense and we already have it mixed... guess I'm kind of used to CamelCase structs and classes from C++ and under_score variables/instances.
Another style thing: you aligned the pointer with the name (also what I'm used to and seems to be more common). The fix_code_style.sh script currently aligns with type, but I would change that to align with name again as when adding it first, see #617. |
Nice thing is that it also decreases code size (at least in most common cases with default telemetry set). |
do we have a strategy to merge this ? |
Looks good to merge to me, but I didn't have a chance to test on real hardware yet... |
I just could test it on ardrone and lisa/s yet, would be nice if someone can do it. Otherwise I'll do that at the end of the week. If it works, I'll merge it then if you're okay. |
Works fine on my LisaMX as well, merging. |
Datalink/Telemetry functions Replacing the old macros with functions. This is done by introducing a generic transport structure and a generic link_device structure. It is only a small step on purpose, changing everything at once usually fails. There is no functional changes, except that the transport and link_device for periodic function is passed as an argument, which will allow to create a telemetry task for logging in parallel of the normal telemetry (soon). We now have: - 4 transports (pprz, pprzlog, xbee, ivy) - 5 devices (uart, usb_uart, sdio(chibios), udp, w5100)
{ | ||
dev->transmit(dev->periph, trans->ck_a_tx); | ||
dev->transmit(dev->periph, trans->ck_b_tx); | ||
dev->send_message(dev); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is incorrect should be dev->periph. This fails in a a lot of the datalinks ;)
Replacing the old macros with functions. This is done by introducing a generic transport structure and a generic device structure.
It is only a small step on purpose, changing everything at once usually fails.
There is no functional changes, except that the transport and device for periodic function is passed as an argument, which will allow to create a telemetry task for logging in parallel of the normal telemetry (soon).
We now have:
This was tested on: