ASCOMInitiative / Conform

ASCOM Interface Conformance Checker
GNU General Public License v3.0
6 stars 2 forks source link

Is CoverCalibrator check correct? #12

Open ea1ii opened 6 months ago

ea1ii commented 6 months ago

Hi,

I'm working on my own CoverCalibrator, and so far so good: everything moves, driver seems to works nice in N.I.N.A., etc.

But when I run the Conform Check tool i get this:

Methods 
18:15:23.310 OpenCover                         OK       OpenCover was successful. The asynchronous open took 9.5 seconds
18:15:32.913 CloseCover                        OK       CloseCover was successful. The asynchronous close took 9.6 seconds
18:15:37.791 HaltCover                         OK       Cover is no longer moving after issuing the HaltCover command
18:15:37.854 CalibratorOn                      OK       CalibratorOn with brightness -1 threw an InvalidValueException as expected
**18:15:38.044 CalibratorOn                      ERROR    CalibratorOn with brightness 0 was unsuccessful - the returned CoverState was 'Unknown' instead of 'Ready'. The asynchronous operation took 0.1 seconds**
18:15:38.137 CalibratorOn                      OK       CalibratorOn with brightness 63 was successful. The synchronous operation took 0.0 seconds
18:15:38.158 CalibratorOn                      OK       The Brightness property does return the value that was set
18:15:38.249 CalibratorOn                      OK       CalibratorOn with brightness 127 was successful. The synchronous operation took 0.0 seconds
18:15:38.270 CalibratorOn                      OK       The Brightness property does return the value that was set
18:15:38.359 CalibratorOn                      OK       CalibratorOn with brightness 191 was successful. The synchronous operation took 0.0 seconds
18:15:38.380 CalibratorOn                      OK       The Brightness property does return the value that was set
18:15:38.471 CalibratorOn                      OK       CalibratorOn with brightness 255 was successful. The synchronous operation took 0.0 seconds
18:15:38.492 CalibratorOn                      OK       The Brightness property does return the value that was set
18:15:38.541 CalibratorOn                      OK       CalibratorOn with brightness 256 threw an InvalidValueException as expected
18:15:38.630 CalibratorOff                     OK       CalibratorOff was successful. The asynchronous action took 9.6 seconds
18:15:38.651 CalibratorOff                     OK       Brightness is set to zero when the calibrator is turned off

Conformance test complete 

The offending line does not make a lot of sense to me: 18:15:38.044 CalibratorOn ERROR CalibratorOn with brightness 0 was unsuccessful - the returned CoverState was 'Unknown' instead of 'Ready'. The asynchronous operation took 0.1 seconds

I can imagine that the cover being closed might be a requisite to switch the calibrator on (with 0 or non 0 values) but, as per the standard, Ready is not in the enum for CoverState value. The Unknown comes from the previous HaltCover check that leaves the cover neither open nor closed.

Am I missing something, or is there a bug here?

Kind regards,

Carlos

Peter-Simpson commented 6 months ago

Hi Carlos,

Are you using the browser based Conform Universal or the original WinForms Conform, it’s difficult to tell from the log fragment you posted? Assuming you are using ConformU, please can you:

With the full log I should be able to determine where the issue originates.

Many thanks, Peter

Peter-Simpson commented 6 months ago

Hi Carlos,

OK, I can see you are using the original Conform program. I've found the bug, which is that when Conform detects an issue, it gives an incorrect error message.

Your device returned a CalibratorState value other than CalibratorStatus.Ready in response to the CalibratorOn() call with a brightness of 0, so I think there is an issue with your device.

However, instead of telling you what CalibratorState value it received, Conform is incorrectly reporting the CoverState value.

This issue has been fixed in Conform Universal.

Best wishes, Peter

ea1ii commented 6 months ago

Hi Peter, Thank you for your help. Turns out I missed the scenarios when the calibrator in On with 0 intensity. Works perfect now. Kind regards Carlos Gil 

On Sunday, 28 April 2024 at 22:13:52 BST, Peter Simpson ***@***.***> wrote:  

Hi Carlos,

OK, I can see you are using the original Conform program. I've found the bug, which is that when Conform detects an issue, it gives an incorrect error message.

Your device returned a CalibratorState value other than CalibratorStatus.Ready in response to the CalibratorOn() call with a brightness of 0, so I think there is an issue with your device.

However, instead of telling you what CalibratorState value it received, Conform is incorrectly reporting the CoverState value.

This issue has been fixed in Conform Universal.

Best wishes, Peter

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Peter-Simpson commented 6 months ago

Hi Carlos,

I'm glad you found the issue. I'll fix the Conform error in the next release, please can you leave the issue open and I'll close it when the fix is developed.

Best wishes, Peter