Hello,
I am trying to develop an Alpaca based focusser...
It is detected by Sharpcap, I can connect, I can do a goto...
BUT, I can only move using the "negative"/"positive" buttons ONCE.
Once the button has been pressed, it stays disabled...
I have tried it also with the ASCOM Alpaca simulator and it does the same thing (see attached image)..
Is this a new bug, or something known (and already fixed if I was intelligent enough to take the latest version!)
Thanks,
Cyrille
Issue with Alpaca Focussers?
Forum rules
If you have a problem or question, please check the FAQ to see if it already has an answer : https://www.sharpcap.co.uk/sharpcap-faqs
Please also read about Troubleshooting USB Issues before posting.
*** Please do not post license keys - please report any problems with licensing to 'admin' by private message ***
Please include the following details in any bug report:
* Version of SharpCap
* Camera and other hardware being user
* Operating system version
* Contents of the SharpCap log after the problem has occurred.
[If SharpCap crashes, please send the bug report when prompted instead of including the log]
If you have a problem or question, please check the FAQ to see if it already has an answer : https://www.sharpcap.co.uk/sharpcap-faqs
Please also read about Troubleshooting USB Issues before posting.
*** Please do not post license keys - please report any problems with licensing to 'admin' by private message ***
Please include the following details in any bug report:
* Version of SharpCap
* Camera and other hardware being user
* Operating system version
* Contents of the SharpCap log after the problem has occurred.
[If SharpCap crashes, please send the bug report when prompted instead of including the log]
-
cyrille.de.brebisson
- Posts: 75
- Joined: Sun Oct 01, 2023 4:42 pm
Issue with Alpaca Focussers?
- Attachments
-
- alpaca.png (13.6 KiB) Viewed 907 times
- admin
- Site Admin
- Posts: 17545
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: Issue with Alpaca Focussers?
Hi Cyrille,
the fact that the individual button is staying deactivated would indicate that the code that the button runs when you click it is never completing - the button disables itself while the code is running to avoid double activation, and if the code never completes then it will never re-enable itself.
However, I can't quite see how that would happen - apart from a bunch of error handling and thread based gymnastics to avoid the problem of a freezing ASCOM driver hanging the whole application UI, all the button does is send the 'Move' command to the ASCOM driver. With a local ASCOM driver, that Move command could never return which would lead to the problem, but with Alpaca, I assume the Alpaca remote API call will timeout eventually, which should bring the button back to life...
Note that SharpCap really expects the 'Move' API to start the movement and then return immediately - you then find out when the movement is complete by checking IsMoving and Position. The ASCOM documentation doesn't explicitly state this, but it's the way that most focuser drivers I have encountered work.
If that still doesn't get anywhere, then it would be worth checking the SharpCap log to see if anything unusual pops up when this problem occurs. If still no joy, please feel free to send me some code/binaries I can test and I can debug at my end.
thanks,
Robin
the fact that the individual button is staying deactivated would indicate that the code that the button runs when you click it is never completing - the button disables itself while the code is running to avoid double activation, and if the code never completes then it will never re-enable itself.
However, I can't quite see how that would happen - apart from a bunch of error handling and thread based gymnastics to avoid the problem of a freezing ASCOM driver hanging the whole application UI, all the button does is send the 'Move' command to the ASCOM driver. With a local ASCOM driver, that Move command could never return which would lead to the problem, but with Alpaca, I assume the Alpaca remote API call will timeout eventually, which should bring the button back to life...
Note that SharpCap really expects the 'Move' API to start the movement and then return immediately - you then find out when the movement is complete by checking IsMoving and Position. The ASCOM documentation doesn't explicitly state this, but it's the way that most focuser drivers I have encountered work.
If that still doesn't get anywhere, then it would be worth checking the SharpCap log to see if anything unusual pops up when this problem occurs. If still no joy, please feel free to send me some code/binaries I can test and I can debug at my end.
thanks,
Robin
-
cyrille.de.brebisson
- Posts: 75
- Joined: Sun Oct 01, 2023 4:42 pm
Re: Issue with Alpaca Focussers?
Hello,
Actually, the problem shows using the (official) Ascom simulators: https://github.com/ASCOMInitiative/ASCO ... Simulators
Download the code, open one of the project (I opened the FocusserSimulator project file), it will open visual studio, build and run. It actually compiles ALL the simulators and run one app that has them all..
Then, in sharp cap: file/detect remove HW, in file/preference/hardware, select the alpaca simulator for focusser.
camera/connect a camera, connect focusser, click on the button and I get these errors...
As you said, the alpaca http request returns imediately on a move, the position changes, BUT, at least on my computer, 1 times out of 3, the button stays disabled...
No clue why...
If you can not reproduce on your side, I will do a video grag and send it to you and I can give you any logs I can (if you tell me how to get them!)
Cyrille
Actually, the problem shows using the (official) Ascom simulators: https://github.com/ASCOMInitiative/ASCO ... Simulators
Download the code, open one of the project (I opened the FocusserSimulator project file), it will open visual studio, build and run. It actually compiles ALL the simulators and run one app that has them all..
Then, in sharp cap: file/detect remove HW, in file/preference/hardware, select the alpaca simulator for focusser.
camera/connect a camera, connect focusser, click on the button and I get these errors...
As you said, the alpaca http request returns imediately on a move, the position changes, BUT, at least on my computer, 1 times out of 3, the button stays disabled...
No clue why...
If you can not reproduce on your side, I will do a video grag and send it to you and I can give you any logs I can (if you tell me how to get them!)
Cyrille
-
cyrille.de.brebisson
- Posts: 75
- Joined: Sun Oct 01, 2023 4:42 pm
Re: Issue with Alpaca Focussers?
Hello,
Ok, well, it looks like the problem is 90% my mouse!
My poor mouse is ageing, and now has bounces on the left click... This causes 2 VERY quick click in succession... And it looks like this is what is causing the UI problem in sharpcap... Changing mouse solves the problem!!!!
However, I have another request/question...
You seem to block the setup button for alpaca devices stating that setup is handled differently... which is true to some extent...
Any alpaca device is supposed to have a setup page at:
http://host:port/setup/v1/type/id/setup (with type and id as needed)...
Could you open a web browser to that URL when the user clicks on setup? This would be nice!
Thanks,
Cyrille
Ok, well, it looks like the problem is 90% my mouse!
My poor mouse is ageing, and now has bounces on the left click... This causes 2 VERY quick click in succession... And it looks like this is what is causing the UI problem in sharpcap... Changing mouse solves the problem!!!!
However, I have another request/question...
You seem to block the setup button for alpaca devices stating that setup is handled differently... which is true to some extent...
Any alpaca device is supposed to have a setup page at:
http://host:port/setup/v1/type/id/setup (with type and id as needed)...
Could you open a web browser to that URL when the user clicks on setup? This would be nice!
Thanks,
Cyrille
- admin
- Site Admin
- Posts: 17545
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: Issue with Alpaca Focussers?
Hi,
thanks for the update on the double click issue - that should give me enough to find/fix the underlying problem (I should probably count the number of times the button is disabled rather than just a flag).
I will look at the setup possibility and see if I can add it.
thanks,
Robin
thanks for the update on the double click issue - that should give me enough to find/fix the underlying problem (I should probably count the number of times the button is disabled rather than just a flag).
I will look at the setup possibility and see if I can add it.
thanks,
Robin
-
cyrille.de.brebisson
- Posts: 75
- Joined: Sun Oct 01, 2023 4:42 pm
Re: Issue with Alpaca Focussers?
Hello,
Yep, that was a weired one!!!!
Do you have ALpaca devices to test, or are you using the simulator?
Cyrille
Yep, that was a weired one!!!!
Do you have ALpaca devices to test, or are you using the simulator?
Cyrille
- admin
- Site Admin
- Posts: 17545
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: Issue with Alpaca Focussers?
Hi,
I have mostly been using the simulator when necesary to test, sometimes on the local PC and sometimes running remotely. I have fixed the double click issue for this update (I hope anyway - I couldn't make it happen - probably related to getting two clicks fast enough), but I haven't had a chance to look at the setup URL yet.
cheers,
Robin
I have mostly been using the simulator when necesary to test, sometimes on the local PC and sometimes running remotely. I have fixed the double click issue for this update (I hope anyway - I couldn't make it happen - probably related to getting two clicks fast enough), but I haven't had a chance to look at the setup URL yet.
cheers,
Robin