big changes this week to ASCOM device handling - please read on...
Download Link : https://d.sharpcap.co.uk/download.html? ... 0&arch=x64
ASCOM Device Retry/Reconnect Support
One of the things I notice in lots of uploaded bug reports is a common pattern. Something fails with an ASCOM device - for examply moving an 'XYZ' focuser fails or changing filters on a 'PQR' wheel. When I dig into what has happened in the run up to the failure by looking at the associated SharpCap log, I frequently find a USB disconnect event logged not long before the failure which looks like it is the failing device disconnecting from USB. Maybe the cable has been pulled slightly by a mount movement? Maybe the device has glitched and disconnected? Maybe the user pulled the plug deliberately? Anyway, whatever the cause, the error is being caused by trying to send a command to a device that isn't connected any more.
Previous versions of SharpCap would have just popped up a message to tell you that there was a problem with your XYZ focuser. This new version takes a different approach...
In the case of a failure of a significant action (ie move a focuser or filter wheel, slew, sync or move a mount, etc), SharpCap will run through a retry sequence automatically:
* First retry - just send the command again - if it was just a temporary glitch this may well succeed.
* Second retry - try to disconnect and then reconnect the device. If the reconnect succeeds, send the command again.
Possible outcomes :
* First retry or second retry works and command is sent successfully - all is well - SharpCap will continue with whatever it is doing.
* Second retry reconnects but the command fails again - show failure message very much like the old SharpCap used to.
* Second retry fails to reconnect the device - show a message explaining that the device is probably no longer connected and prompt the user to check the connection - for instance
The user can try the 'Reconnect Hardware' button - possibly after checking the connection or even unplugging then reconnecting the device to reset it.
Hopefully this will provide a much more user-friendly way to deal with issues related to devices disconnecting.
Note that if you are using SharpCap automation (ie the Sequencer or similar), you will just get the two retries happening, not the 'Reconnect Device' window shown above - instead the sequencer will log the error and stop if both retries fail.
Python Scripting update to Python 3.4
The Python scripting in SharpCap has been running Python 2.7 up to now, but finally there is a version of IronPython available that supports Python 3.4 - I have now incorporated this into SharpCap.
Python scripts may need updating to reflect the change from Python 2.7 to Python 3.4 (in particular, 'print x' becomes 'print(x)' ).
I have added the same site-packages to the standard python library packages as before - that is 'six' and 'pyro4'. If any scripting users have ideas for useful additional default packages (must be small, and pure python rather than using native libraries), please let me know.
Code cleanup
I have done a big code cleanup and modernization in this release. The changes are done by automated tools, so in general what the code does should be exactly the same after the changes as before. However, there are hundreds or even thousands of small changes being made, so it is possible that some could have side effects. Do report any new bugs!
Code: Select all
Other Features
As usual, various bug fixes have been made, and this SharpCap 4.1 beta includes the new ZWO SDK and other bug fixes included in SharpCap 4.0.9529
cheers,
Robin