Weird behaviour with RadioComBridge and Modules
« on: August 21, 2016, 01:30:44 pm »
Hi all,

I am working on a controller with integrated Oplink capabilities.

I have managed all the issues porting pios to the STM32L152 processor.

However I am stuck with the following problem:

I have put all the controller functionality into a Module.

When I add the new module using the makefile, the RadioComBridge module no longer passes through UAVObjects to the USB via HID.

If I remove the module, it works as per a standard Oplink.

I have tried to stub out all UAVObject related code, leaving a bare LCD and power path management logic.

The controller also has an onboard GPS for home location, if I add the GPS module it still works fine.

To add a new module, is all that is required is an appropriate folder structure and a MODULE_INITCALL call? in addition to modifying the Makefile.

Or am I missing something important.

Thanks

Joel

Re: Weird behaviour with RadioComBridge and Modules
« Reply #1 on: August 22, 2016, 05:30:22 pm »
Hi,
i'm not sure what you mean with "controller functionalities".
Revolution (and Sparky2) boards have integrated oplink module on board.
This should be a good start.

Are you processing the uavo stream in your custom module? this may be the issue.
This case would need some modification to radiocombridge to handle the added stream.

You have got it right, modules only needs the folder structure and MODULE_INITCALL to be functional.

Alessio


Re: Weird behaviour with RadioComBridge and Modules
« Reply #2 on: August 22, 2016, 11:22:11 pm »
Sorry for the confusion regarding terminology.

I am making an smaller RC controller, with thumb sticks and a small LCD, to provide control and telemetry through an onboard RFM22B. (which is based of the OpLink code)

My task for managing the LCD should use UAVObjects to obtain status to display on the LCD. it connects via the UAVObjectConnectQueue behaviour however I commented all this code out and it still had the same effect.

As far as I was aware Modules were completely separable and the existence of one would have no effect on the behaviour of another (if independent, assuming space available for code)

Thanks for the assistance

Joel

Re: Weird behaviour with RadioComBridge and Modules
« Reply #3 on: August 23, 2016, 10:07:40 am »
It is very interesting. this work may also be useful, for example, to integrate telemetry with Taranis or similar opentx based radios.
Unfortunately it is difficult to help without looking at the module's code.
Could you check the free heap with your module enabled? Probably lcd code uses a fair bit of heap/ram to work so it may be that telemetry module is unable to start. But this is only a wild guess.

Re: Weird behaviour with RadioComBridge and Modules
« Reply #4 on: August 23, 2016, 01:49:02 pm »
Thanks Alessio,
Looks like it was a heap issue, I reduced the allocated heap for the LCD update task and now it works fine. BTW the LCD is a simple three character seven segment display, it shows flight mode, flight time and any alarms. I'll try and post an image

Thanks

Joel
« Last Edit: August 23, 2016, 01:54:37 pm by VTXTech »