Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is CoverCalibrator check correct? #12

Open
ea1ii opened this issue Apr 28, 2024 · 4 comments
Open

Is CoverCalibrator check correct? #12

ea1ii opened this issue Apr 28, 2024 · 4 comments

Comments

@ea1ii
Copy link

ea1ii commented Apr 28, 2024

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
Copy link
Member

Peter-Simpson commented Apr 28, 2024 via email

@Peter-Simpson
Copy link
Member

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
Copy link
Author

ea1ii commented Apr 29, 2024 via email

@Peter-Simpson
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants