jmason86 / MinXSS_Beacon_Decoder

Beacon decoder for the MinXSS CubeSat in space; MinXSS-2 launch on 2018-11-19
http://lasp.colorado.edu/home/minxss
GNU General Public License v3.0
11 stars 6 forks source link

No GUI output #23

Closed K4KDR closed 5 years ago

K4KDR commented 5 years ago

After commit 321e855, the following occurs when running minxss_beacon_decoder.py on Ubuntu 16.04 (64-bit):

With minxss_beacon_decoder.py listening to Direwolf for KISS output:

input-tab

... and a valid MinXSS-1 packet is received & decoded by Direwolf:

direwolf

... -no- telemetry is displayed in the GUI:

gui

... however, raw hex data IS written to the log file:

log-file

... also please note that the KISS connection between minxss_beacon_decoder.py & Direwolf crashes after the reception of a packet.

K4KDR commented 5 years ago

Additional:

It also appears that the contents of input_properties.cfg get erased when this scenario occurs.

jmason86 commented 5 years ago

Hm... maybe that pull request actually introduced this error. Do you want to try changing back the 0xdb back to 0xdd?

K4KDR commented 5 years ago

Thank you for the reply!

Adjusting the KISS byte exception back to the incorrect value did not help, but after pulling down commit bbec6dc , the GUI displays perfectly again!

screenshot from 2018-09-30 15-28-30

jmason86 commented 5 years ago

Hm.. would you mind also posting the debug log/ files for those two commits? Also, does running the tests/test_send_tcpip_packets.py still work for you in both commits?

Thanks for helping me track down the root cause of this issue! I don't have any radio equipment at home so I can't replicate this issue.

K4KDR commented 5 years ago

Glad to help! Please see comment:

https://github.com/jmason86/MinXSS_Beacon_Decoder/issues/23#issuecomment-425745266

... as of that commit and beyond, the GUI displays data correctly again.

K4KDR commented 5 years ago

Additional note: I'm not doing any over-the-air (radio) testing either. Audio of MinXSS-1 packets are played in Audacity & decoded by Direwolf. The KISS connection sends the decoded data to your decoder. Happy to provide more detail if helpful at any point.

K4KDR commented 5 years ago

A short video of my test setup may be seen at:

https://www.qsl.net/k/k4kdr//video/k4kdr-minxss-test-demo.mp4

jmason86 commented 5 years ago

Right, finding which commit worked vs didn’t is helpful. I used that info to do a diff on the code but nothing super obvious struck me as the problem which is why I’m hoping to get a hold of the .log files to see what messages it prints out to see what code is actually being executed vs not. But I don’t have any audio recordings and such to play and run through that path of the code, so I just can’t replicate it. Those logs should help though.

K4KDR commented 5 years ago

Glad to provide more info!

First, here is the audio file that I test with in case it might be useful to you:

https://www.qsl.net/k/k4kdr//files/minxss/MinXSS-1--packet-x3.wav

... and I see that I opened this issue on 29-Sep-2018, so here are the LOG file entries from that date:

https://www.qsl.net/k/k4kdr//files/minxss/k4kdr-logfile-2018-09-29.txt

... finally, in looking at the OUTPUT folder from that date, I see that the files produced during the times the app was run on that commit were zero in size:

https://www.qsl.net/k/k4kdr//files/minxss/k4kdr-output-folder-2018-09-29.png

jmason86 commented 5 years ago

Perfect, thanks! Ah, so the screenshot from your original post of the log file was actually from a prior run when things were still working? That would clear things up a bit, if that was the case.

K4KDR commented 5 years ago

Sorry if my original post was not clear; the best image in the original post was the GUI with no data present... that was the real issue (plus the fact that it crashed the KISS connection after one packet):

gui

K4KDR commented 5 years ago

By the way, you may have been speaking figuratively regarding the "diff" command to compare various versions of the code (even though the use of that command would be completely fine), but on the outside chance that you're not aware, clicking on the commit number in my initial post prompts github to display a very nice side-by-side & color-coded comparison of the changes that occurred in that commit:

screenshot from 2018-10-03 11-19-46

jmason86 commented 5 years ago

Yep, that's exactly what I was using. Most of the cleaning I've been doing is just refactoring -> move code to well named functions, make variables with better names, etc. The logic shouldn't be impacted, but apparently in this case it was somehow. That does make the diff kind of hard to sift through since it's highlighting the rearranging more so than any logic. But clearly something did change.. just gotta look a little harder.

jmason86 commented 5 years ago

Think I found the problem (or at least a problem that definitely would've impacted this). See if 5ad9afdd0c90afba95b4971fd5d49fd0432139cb fixes the issue!

For future reference this is what I found was wrong:

It looks like this another carry over from the transition from pyside to pyside2. When I query whether the checkboxes are checked in pyside the syntax was checkbox.isChecked (i.e., it was a property) but in pyside2 it is checkbox.isChecked() (i.e., it's a function).

K4KDR commented 5 years ago

Commit 5ad9afd works just fine on my system with a test packet!

screenshot from 2018-10-03 20-51-03

jmason86 commented 5 years ago

Perfect! Glad the resolution ended up being so simple! This code cleaning actually exposed something that should have been failing before but wasn't. Yay!