Repository navigation
Conversation
The camera omits ImageFlip/ImageFlipStyle while flip is off, and refuses
ImageFlip/enabled set to true without it (badXmlContent). So the two were
reported as a switch and a select that could not be used: turning flip on
failed, and choosing a direction while off failed with pathNotFound.
They are now one linked select, like BLC mode, as the camera UI shows them
("Mirror"). The direction has no off option, so pyhik adds OFF; choosing it
writes only the flag (ImageSetting.off_value_written is false). Any other
option turns flip on with that direction in one PUT, inserting the element
when it is absent.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CqtSBY5RLaetEg5m4j4r6U
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some cameras (seen on a DS-2CD2385G1) omit
ImageFlip/ImageFlipStylefrom/ISAPI/Image/channels/1while flip is off, and refuseImageFlip/enabledset totruewithout it. So the switch and the select pyHik reported could not be used:The camera UI shows them as one control ("Mirror": OFF, Left/Right, Up/Down, Center). pyHik now reports them the same way, as one linked select like BLC mode:
ImageFlip/ImageFlipStylegetslinked_enabled_path="ImageFlip/enabled", andImageFlip/enabledis no longer reported on its own.OFF(ImageSetting.off_value). The newImageSetting.off_value_writtenfield isFalsefor it: choosingOFFwrites onlyenabled=false, neverOFFto the direction element. It isTruefor every other linked select, so BLC is unchanged.set_image_linked_setting), inserting the direction element when it is absent.OFFwhile flip is off, the direction while it is on.Tests: parsing (merged, options, value off and on, BLC unchanged), and writes against the fake device, which now refuses flip on without a direction as the camera does (on with a direction, another direction, off writes only the flag, off while off). README updated.
Note for consumers: an
ImageFlip/enabledswitch no longer appears; its function is theOFFoption of the direction select.