AllskyTeam / allsky

A Raspberry Pi operated Wireless Allsky Camera
MIT License
1.2k stars 180 forks source link

[BUG] If a field is outside the image nothing is indicated in overlay manager #3317

Closed EricClaeys closed 9 months ago

EricClaeys commented 9 months ago

There log file contains ERROR: Field 'ZWO ' is outside of the image but nothing in the Overlay Editor to indicate that OR to fix it. The user has to know which .json file to fix and manually do so.

morrowwm commented 9 months ago

I had this issue also. While I was learning how to use the overlay editor, I think I put ${CAMERA_TYPE} ${CAMERA_MODEL} at a huge "y" position. Or perhaps something put the item there by default?

The error log reported:

ERROR: Field 'RPi ArduCam_16_MP' is outside of the image

I found this configuration in allsky/config/overlay/config/overlay.json, with "y" value of 3008. I changed that to 200, then the item showed up in the overlay editor, where I could delete it.

You could test this by typing in an off-image value in the x or y Position fields.

Is it only ever _overlayConfigFile which can have these items?

For a quick fix, maybe just add the filename to the error message?

    652             if outOfBounds:
    653                 s.log(0, f"ERROR: Field '{fieldLabel}' is outside of the image. Check config in {self._overlayConfigFile}")  
EricClaeys commented 9 months ago

@morrowwm, the default position for CAMERA_TYPE, CAMERA_MODEL is fixed in the next release. The current location assumed it was on an RPi HQ camera or a high-resolution ZWO camera.

This Issue is to have the Overlay Editor tell you when a field is outside the image and to put it somewhere in the image so you can fix it or delete it. That should eliminate the need to change the outOfBounds message, although I suppose it should say "Fix in the Overlay Editor".

morrowwm commented 9 months ago

OK, good to know.

Alex-developer commented 9 months ago

Fix committed to the next release branch