Debug 1-4 values shown in GUI not correct.

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
mr.rc-cam
Posts: 457
Joined: Wed Jul 27, 2011 11:36 pm

Debug 1-4 values shown in GUI not correct.

Post by mr.rc-cam »

I have MWC pre-release candidate 2.1 r949 (couple weeks old). I was adding some features to my MWC-Frsky telemetry interface today and ran into a problem with the GUI's DEBUG1-DEBUG4 registers. I was using them to confirm the telemetry test data; After several hours of trying to resolve what I thought was a problem with my board, I found that the actual issue is with the GUI's displayed DEBUG values.

Some GUI debug values are incorrect. For example, a data value of 3 is shown as 2. And a 10 is shown as 9, 17 is shown as 16, 24 is shown as 23, and so on. That incorrect data appears as a modulo issue in the debug data (every 7th data value is -1).

I don't know if the issue is on the more recent (r976 ?) release. So it would be awesome if a r976+ user could try out some simple test code. Here is a very basic test to check for the debug data problem.
1. Open Serial.ino and find this code snippet:

Code: Select all

   case MSP_DEBUG:
     headSerialReply(8);


2, Change it to this:

Code: Select all

   case MSP_DEBUG:
     headSerialReply(8);
     debug[0] = 3;
     debug[1] = 10;
     debug[2] = 17;
     debug[3] = 24;


3. Then upload and check the GUI. If the DEBUG1-DEBUG4 values are 3, 10, 17, and 24 (same as sent to the GUI) then life is good. But if any are wrong then a GUI expert is needed to see what is causing the mangled data.

- Thomas

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: Debug 1-4 values shown in GUI not correct.

Post by Alexinparis »

right, there is something wrong about this.
probably a wrong int16_t <-> uint16_t conversion somewhere.

mr.rc-cam
Posts: 457
Joined: Wed Jul 27, 2011 11:36 pm

Re: Debug 1-4 values shown in GUI not correct.

Post by mr.rc-cam »

Thanks for checking it out. I'll stop my debugging and wait for the fix.

- Thomas

Post Reply