Sensor.set_hmirror() gives "Sensor control failed"

I’m trying to run our old (and still working on our previous camera) code on a second unit, and I get the “Sensor control failed” popup on sensor.set_hmirror(True) (right after a set_transpose(True) which seems to work fine). It’s an H7 with the MT9M114 sensor. Unfortunately I can’t access the other (working) camera to check the sensor but it should be an H7 too.

That control should definitely work. What firmware are you on?

Latest, 4.3.2. Just tested the code on another H7 with the same sensor and I get the same error.

For context we’re doing some __write_regs before that, I guess that could differ between sensors?

This works on my H7 with the MT9M114 and firmware 4.3.2

# Sensor Horizontal Mirror Example
#
# This example shows off horizontally mirroring the image in hardware
# from the camera sensor.

import sensor, image, time

sensor.reset()                      # Reset and initialize the sensor.
sensor.set_pixformat(sensor.RGB565) # Set pixel format to RGB565 (or GRAYSCALE)
sensor.set_framesize(sensor.QVGA)   # Set frame size to QVGA (320x240)
sensor.skip_frames(time = 2000)     # Wait for settings take effect.
clock = time.clock()                # Create a clock object to track the FPS.

# Change this to False to undo the mirror.
sensor.set_hmirror(True)

while(True):
    clock.tick()                    # Update the FPS clock.
    img = sensor.snapshot()         # Take a picture and return the image.
    print(clock.fps())              # Note: OpenMV Cam runs about half as fast when connected
                                    # to the IDE. The FPS should increase once disconnected.

That was indeed the issue - sorry for wasting your time!