Pegasus Flatmaster inconsistent state

Issue #887 resolved
Brian Sweeney created an issue

[x] Is the issue reproducible?
[x] Are all prerequisites that are mentioned inside the manual met?

Version: 1.10 HF3 Beta003

Description

When I plug my Flatmaster into my computer, the panel turns on to 100%. Then when I connect it to NINA, it says the panel is off despite it being on. Clicking the on button in NINA sets the panel to on in NINA and the Flatmaster stays on and the state is consistent. Sometimes, doing this action results errors being thrown and me being unable to get NINA to set the brightness or use the flat wizard/run a flat sequence.

Steps to Reproduce

  • Plug Flatmaster in, it turns on automatically
  • Connect to NINA, Panel is on, but NINA says off
  • Turn panel on in NINA. Panel is on, NINA is on
  • Turn panel off in NINA. Panel is off, NINA is off
  • Try to change brightness. Sometimes receive “One or more errors occurred.” message.

Expected Behavior

I expect NINA’s panel state to match the panel’s state and not throw an error when changing the brightness.

I have attached a log of this happening.

Comments (10)

  1. Stefan B repo owner

    Hi Brian,

    thank you for the report. Can you check if the problem also persists inside the nightly builds? In those the flat devices did have some minor tweaks and maybe the problem doesn’t occur anymore.

    Make sure to backup your profiles prior to upgrading to the nightly build.

    Thanks,
    Stefan

  2. Brian Sweeney reporter

    Sorry for the delay. I just download nightly 109.

    When I connect the panel to NINA, NINA says the panel is off even though it is on still. I turned it “on” and then off and the state in NINA matched. I turned it back on and set the brightness to 220. and NINA showed “off” again.

  3. Dale Ghent

    Not sure what’s going on inside the FlatMaster, but it kinda goes out to lunch from NINA’s point of view:

    2021-07-15T21:52:24.5920|ERROR|SerialSdk.cs|ReadAndLog|138|PegasusFlatMaster: timed out for port : COM3 System.TimeoutException: The operation has timed out.
       at System.IO.Ports.SerialStream.Read(Byte[] array, Int32 offset, Int32 count, Int32 timeout)
       at System.IO.Ports.SerialStream.Read(Byte[] array, Int32 offset, Int32 count)
       at System.IO.Ports.SerialPort.InternalRead(Char[] buffer, Int32 offset, Int32 count, Int32 timeout, Boolean countMultiByteCharsAsOne)
       at System.IO.Ports.SerialPort.ReadTo(String value)
       at NINA.Core.Utility.SerialCommunication.SerialSdk.ReadAndLog(ICommand command, Int32& retries) 
    Command was : NINA.Equipment.SDK.FlatDeviceSDKs.PegasusAstroSDK.OnOffCommand. 2 retries left
    

    why this is happening, I’m not sure. Communications with the FlatMaster looks fine up until that point.

  4. Simon Thompson

    I have a similar issue using my Pegasus Flatmaster as Brian, also can’t get Dynamic Brightness/Exposure to work

  5. julien leroy

    I also have similar issues.

    I take a look at the code and there are in my opinion two way to fix this, force the light status to off in the connection task (the ez way) or fetch the panel state during the connection task. Do we have a documentation of the panel sdk ?

  6. julien leroy

    I test on the latest 1.11 nightly with the fix (force the light off in the connection routine) and everything seams to work as expected (status in the equipment tab and flat wizard).

    I will do a PR/MR with this code.

  7. Stefan B repo owner

    I will probably buy one of those flatmasters and then can look into the issue in detail

  8. Stefan B repo owner

    The next nightly build (1.11 148) will contain a fix to set the state on connection to have a consistent state at startup.

    PS: I also own a Flatmaster 250 now and could reproduce the problem and thus fix it.

  9. Log in to comment