QHY174M-GPS calibration StartPos and EndPos

User avatar
admin
Site Admin
Posts: 13344
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: QHY174M-GPS calibration StartPos and EndPos

#11

Post by admin »

Hi,

I have a bug fix for the failure to remember the selection area now.

The failure to update is down to threading. When run from the menu button, the script runs in SharpCap's main thread, and if you do extended processing then it will freeze the SharpCap UI.

The best workaround is to run the form in its own thread. This code shows a sample of how to do that

Code: Select all

# IronPython Pad. Write code snippets here and F5 to run. If code is selected, only selection is run.
from System.Threading import Thread, ThreadStart, ApartmentState

def hello():
	print "new", Thread.CurrentThread.ManagedThreadId
	
def hellothread():
	th = Thread(ThreadStart(hello))
	th.SetApartmentState(ApartmentState.STA)
	print "main", Thread.CurrentThread.ManagedThreadId
	th.Start()
	
hellothread()
Note that the SetApartmentState line is required if the new thread is going to show the form or other user interface.

cheers,

Robin
Jean-Francois
Posts: 402
Joined: Sun Oct 13, 2019 10:52 am
Location: Germany

Re: QHY174M-GPS calibration StartPos and EndPos

#12

Post by Jean-Francois »

Hello Robin,

Thanks ... after maybe 20 crashes of SharpCap ... I find a working version ...

Here the "menu" version without the live view freezing.
Calibration_LED_menu_2022-10-02_Thread.py.txt
(11.85 KiB) Downloaded 86 times

Note that the forum does not allow to upload directly a *.py file. I add ".txt" at the end of the file name.
So, delete the ".txt" after the download of the files.

Regards,
Jean-Francois
Jean-Francois
Posts: 402
Joined: Sun Oct 13, 2019 10:52 am
Location: Germany

Re: QHY174M-GPS calibration StartPos and EndPos

#13

Post by Jean-Francois »

Hell Robin,

I install the last version and I did a quick test.
Thanks, both small update work.

But one thing concerning the FITS or SER header information ... I guess that you can change the initial text.
Not all people want "Test-Teleskop" or "JFP_here" in the images :-)

Regards,
Jean-Francois
User avatar
admin
Site Admin
Posts: 13344
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: QHY174M-GPS calibration StartPos and EndPos

#14

Post by admin »

Hi,

the defaults for those settings are both blank, however SharpCap will fill in 'Telescope' and 'Observer' into the SER header if the settings are blank - that pretty much matches the way it used to be in the previous version when the settings were not used. If you have previously set the info for FITS headers - it looks like you have- then those values get used.

cheers,

Robin
Jean-Francois
Posts: 402
Joined: Sun Oct 13, 2019 10:52 am
Location: Germany

Re: QHY174M-GPS calibration StartPos and EndPos

#15

Post by Jean-Francois »

Hello QHY-174-GPS users,

If you want, you can update my script with this last version.
No change in the process itself, but the button changes now the color during the calibration process.
It is a very small change ... but it was very long the program it. At the end it was only to "modify" two words.

The file name is *.txt, but change it back to *.py before use.
This is the "menu" version.
Calibration_LED_menu_2023-01-22_Thread.py.txt
(12.14 KiB) Downloaded 81 times
Regards,
Jean-Francois
Post Reply