LCD config broken for Spektrum, SBUS and OPENLRSv2MULTI

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
User avatar
howardhb
Posts: 189
Joined: Tue Oct 11, 2011 7:10 pm
Location: Port Elizabeth, South Africa

LCD config broken for Spektrum, SBUS and OPENLRSv2MULTI

Post by howardhb »

If Spektrum, SBUS and (possibly OPENLRSv2MULTI , can't test it) RC system is selected in config.h, LCD configuration does not work:
This is evident in latest dev, MultiWii_dev_2014_01_14__r1648 and also latest GPS NAV from EOSBandi. (didn't check any other versions)

You will able to enter LCD configuration with RC stick input but thereafter, the sticks do not respond...
This is because, when LCD config is called, the program jumps out of main loop (in Multiwii.cpp) and end enters a "while(LCD == 1)" loop in configurationLoop().
As a result, serial port RC systems are no longer called and updated. (and also, serial connection to GUI is halted)
The array rcValue[rcChannel[chan]] is never updated....
Standard RC or PPM SUM is not affected because they are interrupt driven.

My solution is: in LCD.cpp,

Code: Select all

void configurationLoop() {
.
.
.
.
  while (LCD == 1) {
    if (refreshLCD) {
      ConfigRefresh(p);
      refreshLCD = 0;
    }
    #if defined(SPEKTRUM)
      readSpektrum();
    #endif
    #if defined(SBUS)
   readSBus();
    #endif
    #if defined(OPENLRSv2MULTI)
        Read_OpenLRS_RC();
    #endif
.
.
.


I have only tested Spektrum RC. It is working fine now.

H.

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: LCD config broken for Spektrum, SBUS and OPENLRSv2MULTI

Post by Hamburger »

Thanks for finding this.
Seems like we need to find a clean way for updating channel data in one spot. I would like to see all this functionality in one place and not scattered over several code fragments in multiwii.cpp.

Post Reply