Shop OBEX P1 Docs P2 Docs Learn Events
Post spin2gui problems here - Page 3 — Parallax Forums

Post spin2gui problems here

13

Comments

  • I believe this is more a windows 10 thing, but I can no longer run the uPython binary that ran fine a few weeks ago. Digging deeper, sometimes seems to have changed with communications (timing?) with the P2-ES

    proploader says this
    \spin2gui\bin>proploader ..\samples\blink1.binary -v -r -t -k
    Opening file '..\samples\blink1.binary'
    Delivering second-stage loader
    ERROR: Propeller not found on COM3
    ERROR: Download failed
    Press return to continue...
    

    This is a new win 10 laptop and late last week it installed an big Windows update. I've noticed a few other windows behaviour changes thanks to that update.

    PNut Control-G finds the board fine. Also the reset event seems to happen just fine.

    Still digging, just posting in case others have seen the same thing happen. Might install a fresh new Spin2gui
  • I reinstalled the same version of Spin2gui. Looks like windows smartscreen was blocking something, without telling me it was blocking something, and after clicking 'run anyway' things are back to normal.

    One other thing looks like "PIN" in 2nd release uPython binary is now "Pin" in the 3rd release. (ie the case matters)

    All good now, just curious whether others strike the same issue

  • I have tried to coginit or cognew a new object to run cogserial in a new cog so as to rx a gps feed. I get errors.
  • pilot0315 wrote: »
    I have tried to coginit or cognew a new object to run cogserial in a new cog so as to rx a gps feed. I get errors.

    What kind of errors? Could you show your code?
  • This isn't necessarily a problem but I have a file FeedBackServoDemo.spin2 with
    OBJ
        FBS:  "FeedBackServo.spin2"
    

    When I modify FeedBackServo, and then compile FeedBackServoDemo, I have to first save FeedBackServo or it compiles without the changes. That is okay; I can do that, but what breaks my head is: I didn't used to have to do that (save first). Cross my heart and hope, etc, etc. And I didn't change gui or operating system or nothin'.

    So I guess my question is: "Should I have to save first in order to incorporate the changes?"
  • This isn't necessarily a problem but I have a file FeedBackServoDemo.spin2 with
    OBJ
        FBS:  "FeedBackServo.spin2"
    

    When I modify FeedBackServo, and then compile FeedBackServoDemo, I have to first save FeedBackServo or it compiles without the changes. That is okay; I can do that, but what breaks my head is: I didn't used to have to do that (save first). Cross my heart and hope, etc, etc. And I didn't change gui or operating system or nothin'.

    So I guess my question is: "Should I have to save first in order to incorporate the changes?"

    No, you shouldn't have to save first. That sounds like a bug that crept in when the changes to check for files changed on disk went in. I'll try to fix it.
  • @ersmith
    Been working on my flight instructor renewal for the FAA. I will get the code to you soon.
    Thanks.Flew yesterday I have a video that I will upload to youtube and send you the link video of a historical site. All nerds would like.
    Martin.

    Thanks for all your help.
  • Hey got a question. Sometimes spin2gui's status section at the bottom JITTERS up and down. What's up??
  • pilot0315 wrote: »
    Hey got a question. Sometimes spin2gui's status section at the bottom JITTERS up and down. What's up??

    I think there's a bug in the automatic scrollbar routines in Tcl/Tk (which decide whether or not a scrollbar is needed) and it gets stuck in a state where it can't decide whether to show a vertical scrollbar or not.

    You could try commenting out two lines in spin2gui/src/gui.tcl:
    autoscroll::autoscroll .bot.v
    autoscroll::autoscroll .bot.h
    
    If you put a "#" character in front of those two lines (they're near line 705 in the file) that should make the scrollbar widgets appear permanently and get rid of the flicker.
  • @ersmith
    Thanks I will try that. I was able to open it with the propeller tool and save it. I will find out if that works.
  • @Tubular

    I had to get a new computer. Have home version. Was able to install gpedit. was able to get all the gui's to work. Am working on a key generator to change to professional. This is to be able to stop the problems. Please contact me for followup. I have a windows geek who will help.
  • Trying to get spin2gui to work at 6900 baud. Any ideas anyone. I am able to change down to 115200 but that's it.

    Thanks
  • pilot0315 wrote: »
    Trying to get spin2gui to work at 6900 baud. Any ideas anyone. I am able to change down to 115200 but that's it.

    Thanks

    Did you mean 9600 baud? I don't think 6900 baud is likely to work. Even 9600 is a bit dubious; Linux complains about speeds that low, although Windows might let you do it -- you'll have to manually change the baud rate in the Run command to -l9600 and -b9600.

    Why do you want to use such a slow rate?
  • Loading at low baud rates causes problems because of the timeouts built into loadp2. The timeout will occur before the host's serial output buffer is completely empty. Also, 6900 is not a standard baudrate, and the host may not support it.
  • Using the VPN1513 GPS. Data is at 9600. Am able to get the feed but data is screwed because of the baud rate.
  • @Tubular

    I have a new laptop and upgraded to windows 10 pro. Had the same problem with same fix. It appears that windows 10 thinks that spin2gui is a virus. Had to tell all my antivirals and windows defender to leave it alone.
  • Yeah. Windows did another update this past week, wonder if I need to install it again. Will find out soon.
  • The only way to prevent Windows "smartscreen" from complaining about spin2gui would be to sign it with a code signing certificate. That costs real money (as in hundreds of dollars). I can't afford that, but if there is interest I could start a kickstarter or patreon to collect funds to do it.
  • samuellsamuell Posts: 554
    edited 2019-05-28 13:42
    Hi Eric,

    I've noticed a tendency for spin2gui taking more and more CPU if I leave the terminal window open. I'm using a VM with Windows 10 installed. My real machine has Linux, and my VM manager is VirtualBox.

    Kind regards, Samuel Lourenço
  • samuell wrote: »
    I've noticed a tendency for spin2gui taking more and more CPU if I leave the terminal window open. I'm using a VM with Windows 10 installed. My real machine has Linux, and my VM manager is VirtualBox.

    Is it the spin2gui process taking the CPU time, or the loadp2 one? And is the terminal window receiving characters?
  • @"Dave Hein"

    meant 9600 baud. The gps modules I have are at these speeds. getting garbage when reading the signal
  • It's hard to debug code without seeing it. Post your code and maybe one of us can figure out what the problem is.
  • samuellsamuell Posts: 554
    edited 2019-05-31 14:23
    ersmith wrote: »
    samuell wrote: »
    I've noticed a tendency for spin2gui taking more and more CPU if I leave the terminal window open. I'm using a VM with Windows 10 installed. My real machine has Linux, and my VM manager is VirtualBox.

    Is it the spin2gui process taking the CPU time, or the loadp2 one? And is the terminal window receiving characters?
    Hi Eric,

    I've confirmed that p2load is the culprit. It takes CPU time even if it is not receiving characters. If I close the terminal, the CPU is free again. Please, see the images in the attached zip file.

    Kind regards, Samuel Lourenço
  • I think loadp2 works by polling for events from the keyboard and the serial port, so it's not too surprising that it uses CPU time even when characters are not being received.

    It's OK to close the loadp2 window if you're not using it. The program running on the P2 will keep running even after the window is closed.
  • @"Dave Hein"

    Here is the code. Thanks for looking at it.
  • @"Dave Hein"
    I am trying to work with the gps feed. It is at 9600
  • @pilot0315 : your ser object (the one that communicates with the PC) is set up for 230400 baud, so that's the speed you should set in spin2gui. The gpsd object talks to the GPS, and that runs at 9600.

    To copy data from the GPS to the PC you'd do something like:
      repeat ' endless loop
        ' get a character from the GPS
        repeat
          result := gpsd.rx
        while result <> -1
        ' transmit it to the PC
        ser.tx(result)
    
  • @ersmith

    Thanks I will look at that.
  • @ersmith

    I get this error
    701 x 688 - 36K
  • Watch for indentation... the "while" has to line up with the "repeat", and the stuff in between should be indented relative to those.
Sign In or Register to comment.