Initial ASCOM Switch status

Issue #1165 resolved
Jeff Shangguan created an issue

Hi, when my ASCOM Switch is connected in NINA, all the switch status is “closed”. The switch driver updates the status once it is connected. And also in NINA log, the switch statuses are all loaded correctly each second. But the initial status in NINA once the switch is connected is wrong.

Comments (5)

  1. Stefan B repo owner

    Not quite clear on the description - Is only the initial status incorrect and it quickly corrects itself afterwards in the UI too?

  2. Stefan B repo owner

    According to the log the values are all zero on connection:
    2022-09-28T16:02:40.5515|INFO|SwitchVM.cs|Connect|258|Successfully connected Switch. Id: ASCOM.Jastro.Switch Name: ASCOM Jastro Switch Driver Version: 0.0
    2022-09-28T16:02:42.4316|TRACE|AscomSwitch.cs|Poll|51|Retrieved values for switch id 0: 0
    2022-09-28T16:02:42.4316|TRACE|AscomSwitch.cs|Poll|51|Retrieved values for switch id 1: 0
    2022-09-28T16:02:42.4316|TRACE|AscomSwitch.cs|Poll|51|Retrieved values for switch id 3: 0
    2022-09-28T16:02:42.4316|TRACE|AscomSwitch.cs|Poll|51|Retrieved values for switch id 4: 0
    2022-09-28T16:02:42.4316|TRACE|AscomSwitch.cs|Poll|51|Retrieved values for switch id 6: 0
    2022-09-28T16:02:42.4316|TRACE|AscomSwitch.cs|Poll|51|Retrieved values for switch id 7: 0
    2022-09-28T16:02:42.4316|TRACE|AscomSwitch.cs|Poll|51|Retrieved values for switch id 5: 0
    2022-09-28T16:02:42.4326|TRACE|AscomSwitch.cs|Poll|51|Retrieved values for switch id 2: 0

    So this would be a driver level issue that it is not directly reporting the correct state.

  3. Jeff Shangguan reporter

    From the log file I can see the switch status is correctly loaded in NINA. But in the UI the status is not updated unless I click the switch button.

  4. Jeff Shangguan reporter

    Hi Stefan, it is really strange behavior. I checked the switch driver log. ICover.GetSwitchStatus is called and the correct values are read from the hardware. (Also for you information, the switch status is updated in the ICover.connect function). But in NINA, the status is not read properly. May I know the logical of NINA to load and initial the status? Or any idea why it is not loaded properly?

  5. Log in to comment