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 modules #1835
Telemetry modules #1835
Conversation
only wrappers (replace makefiles) at this stage
hard-fault recovery is an issue since downlink should be initialized even if AP is not
PPRZLINK should be used now
in particular drop audio_telemetry code
@gautierhattenberger IMHO it would make sense if each of the modules had their own thread with a separate recovery mechanism (since eventually everything will be a module). Should we also mutex critical resources in the telemetry modules? Because I could imagine that now you can easily have multiple telemetries running at the same time - so access to lets say state variables etc. should be protected, right? |
Not sure it is really needed to have each module in a thread, but we can definitely group them (already have some sort of tasks: navigation, control, safety, payload, ...). My real concern is more about the practical implementation and naming:
|
see #243 |
Just quickly about the mutexes - the current solution (protect the state interface) is IMHO the way to go (at least for now). About your questions:
I would put it all in the same "thread" - like you start a thread, and it initializes what it needs. Should be easier to use and more error-proof.
Can you give an example? I am not sure if I fully follow.
Task +1 |
For most modules it probably doesn't make sense to give them their own thread... Task is probably an OK name |
The previous names can be used to call functions from all tasks. This is a simple solution to fix hard-fault recovery (datalink modules init). It can be extended to other modules but probably need some more work.
Tested and working on:
anyone for testing superbit and bluegiga ? |
I can test Lisa F1 today (transparent), although I don't expect any problems here. |
Tested and working:
|
@fvantienen @kirkscheper could you test superbitrf and bluegiga? |
I am on vacation :) also I've been working on an old master on a big Kirk On 19 Aug 2016 4:09 p.m., "Felix Ruess" notifications@github.com wrote:
|
@kirkscheper have you had a chance to test bluegiga yet? |
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.
LGTM
No, can test it on Monday though, that ks for the reminder. Kirk On 17 Sep 2016 9:01 p.m., "Felix Ruess" notifications@github.com wrote:
|
Bluegiga doesn't work with this branch but actually it doesn't currently work with master either. I have been using a branch based on an older master so haven't noticed this. I don't receive any downlink messages... Have there been any changes to SPI lately? |
I don't think so. Can you give us the reference of the working version ? |
I am trying some older versions so see where it breaks. get back to you soon |
First break happens at commit Coverity fixes (#1838) b68d166. An error in that commit prevents correct messages from being interpreted by the GCS. I still receive some downlink data though. When the imu refactor is commited however with [imu] convert imu subsystems to modules (#1788) 17d3277 the downlink is totally broken. |
Regarding the fix b68d166 can you try to revert the line 238 in bluegiga.c (although it should be more dangerous). |
The imu update does play around with spi and i2c defaults though. I am guessing it has something to do with that. |
One difference is that the new lisa s imu defines ASPRIN_2_I2C and USE_I2C while the old one didn't. The ap_srcs.list doesn't define those two at all. Any chance that might have any effect? |
ok, on a hunch I removed those definitions from master and it works again... |
Same fix fixes this PR so it seems like this refactor also works for Bluegiga. |
can you try to add |
Nope, doesn't work. |
do you have your patch in a branch somewhere ? |
https://github.com/kirkscheper/paparazzi/tree/bluegiga_fix Its is strange the i2c definition was not in the previous xml for aspirin or lisa/s |
this was produce a strange side effect on bluegiga module (#1835)
@kirkscheper can you test the patch of #1858 ? |
so I guess this is good to merge now? |
It seems to work. I have only one concern: it is changing a little bit the module generator to have functions split in different "task". This part have not been tested a lot so far. Even if it should be fine, I initially planed to keep this for after the release. If you think it is fine, feel free to merge it. |
merge master and update after changes from #1879
Maybe needs a quick re-test after latest changes? |
re-tested with pprz and xbee over model, and pprz over udp (and it is still working) |
can I merge this one ? |
LGTM |
Nice work, thanks! |
Convert telemetry subsystems to modules.
The second point is not done yet since modules init are part of the global AP thread. Should I just call all modules init (and downlink init) or change the modules generator to be able to group functions (will be useful when converting FBW subsystems to modules) ?