News:

  • September 23, 2026, 01:07:00 PM

Login with username, password and session length

Author Topic: Simulator Serial-port not being saved when changed  (Read 35313 times)

Andrew S

  • Hero Member
  • *****
  • Posts: 144
Re: Simulator Serial-port not being saved when changed
« Reply #15 on: May 01, 2019, 12:48:26 PM »
Still no joy with the sim you sent over. Starting with /c doesn't help it to 'stick' either. Somehow I got it to keep the setting a couple of times (probably by deleting the sim files and allowing it to recreate them). I changed the serial port to a local USB-serial port and the results are the same - can't save the COM port in the sim.

Andrew.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: Simulator Serial-port not being saved when changed
« Reply #16 on: May 01, 2019, 01:32:36 PM »
Still no joy with the sim you sent over. Starting with /c doesn't help it to 'stick' either. Somehow I got it to keep the setting a couple of times (probably by deleting the sim files and allowing it to recreate them). I changed the serial port to a local USB-serial port and the results are the same - can't save the COM port in the sim.

Andrew.

I'm not sure where to go. There really isn't much to this:
1. The serial port field defaults to COM1.
2. On initialization, it reads the .STATE file (if present) and overwrites the default.
3. If the /c flag hasn't been set, it attempts to open the serial port to confirm existence.
   a) If the port does exist, it continues with no changes
   b) If the port doesn't exist, it scans for ports and selects the first one found.
4. When you invoke the selection dialog, it scans for ports and if the currently selected port is in that list, it selects it.
   a) If you choose a port and press OK, it overwrites the serial port field.
   b) If you Cancel, no change.
5. When you shut down, it writes the current serial port field to .STATE.

If the port shows up in the list, it should be written to the .STATE file on shutdown, and should load it on startup.

While testing, when I changed the mapped port (COM1 to COM2 and back) Windows 10 refused to let me open my serial port until I rebooted. It showed up in the device manager correctly, but the port open failed with a not found error.

"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Andrew S

  • Hero Member
  • *****
  • Posts: 144
Re: Simulator Serial-port not being saved when changed
« Reply #17 on: May 01, 2019, 06:56:04 PM »
Is it safe to delete just the .STATE file (with the sim closed) to reset the saved value?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: Simulator Serial-port not being saved when changed
« Reply #18 on: May 01, 2019, 07:00:08 PM »
Is it safe to delete just the .STATE file (with the sim closed) to reset the saved value?

Yes.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Andrew S

  • Hero Member
  • *****
  • Posts: 144
Re: Simulator Serial-port not being saved when changed
« Reply #19 on: May 02, 2019, 01:54:33 PM »
Bob, perhaps my issue is related to the dev-version (2.5.1) Sim you sent over. It doesn't appear to write STATE or FLASH files into C:\Users\Public\Public Documents\Do-more\Designer2_5\Bin (whereas the 2.5.0 version does). Is it putting these files elsewhere perhaps?

Andrew.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: Simulator Serial-port not being saved when changed
« Reply #20 on: May 02, 2019, 02:38:50 PM »
Bob, perhaps my issue is related to the dev-version (2.5.1) Sim you sent over. It doesn't appear to write STATE or FLASH files into C:\Users\Public\Public Documents\Do-more\Designer2_5\Bin (whereas the 2.5.0 version does). Is it putting these files elsewhere perhaps?

Andrew.

I'm probably not up to date on another fix. It's probably going to the 2.2 directory.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Andrew S

  • Hero Member
  • *****
  • Posts: 144
Re: Simulator Serial-port not being saved when changed
« Reply #21 on: May 02, 2019, 03:25:07 PM »
Yep, that was it. Thanks Bob.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: Simulator Serial-port not being saved when changed
« Reply #22 on: May 02, 2019, 08:08:52 PM »
Yep, that was it. Thanks Bob.

Sorry. I was in the middle of doing some other work and had a few minutes during a lengthy build to look at it. I didn't fetch fresh code from version control, so my local copy lacked some fixes others had done. If it's working for you now (other than the directory), I can get you something better.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Andrew S

  • Hero Member
  • *****
  • Posts: 144
Re: Simulator Serial-port not being saved when changed
« Reply #23 on: May 02, 2019, 08:56:17 PM »
Something better would be good.