# Lepton 3.5 Manual FFC

**URL:** <https://forums.openmv.io/t/lepton-3-5-manual-ffc/9753>\
**Category:** OpenMV Boards\
**Created:** [June 30, 2024, 12:12pm UTC](https://forums.openmv.io/t/lepton-3-5-manual-ffc/9753 "2024-06-30T12:12:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![deaduser77](https://avatars.discourse-cdn.com/v4/letter/d/d2c977/32.png) [@deaduser77](https://forums.openmv.io/u/deaduser77)\
**Post date:** [June 30, 2024, 12:12pm UTC](https://forums.openmv.io/t/lepton-3-5-manual-ffc/9753/1 "2024-06-30T12:12:17Z")

</div>

Greetings.  
I am trying to add a feature to my app that lets me manually select between different modes of FFC(Manual, Auto, External). I am a beginner and has little understanding of this stuff but somehow managed the basic implementation for it.

I copied the function from this repo: [GitHub - Kheirlb/purethermal1-uvc-capture: Raw Thermal Data over UVC from PureThermal 2 - Lepton 3.5 - Python](https://github.com/Kheirlb/purethermal1-uvc-capture/tree/master)

this is how the function looks like:

```auto
def set_extension_unit(devh, unit, control, data, size):
  return libuvc.uvc_set_ctrl(devh, unit, control, data, size, 0x81)

SYS_UNIT_ID = 6
sysShutterManual2 = lep_sys_shutter_mode(0, 0, 0, 0, 1, 0, 1, 0, 48928)

def set_manual_mode(self):
      sizeData = 32
      shutter_mode = c_uint16(0)
      setSDK = 0x3D
      controlID = (setSDK >> 2) + 1
      print('controlID: ' + str(controlID))
      res = set_extension_unit(self.devh, SYS_UNIT_ID, controlID, byref(sysShutterManual2), sizeData)
      if res < 0:
        print("Error: could not set manual FFC")
      else:
        print("Manual FFC set successfully")

```

Now when i run this function, it prints the success message, however, my camera goes into standby mode and starts blinking slowly. This also stops the video feed. Switching back to auto mode fixes it.

Why does the camera stops giving feed in manual mode and how do i fix it?

Heres the video of camera’s behavior: [https://youtu.be/rhQdKLl78UE](https://youtu.be/rhQdKLl78UE)

---

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [June 30, 2024, 7:23pm UTC](https://forums.openmv.io/t/lepton-3-5-manual-ffc/9753/2 "2024-06-30T19:23:27Z")

</div>

Hi, I don’t know what the code you gave me maps to. It seems like you wrote some functions to write to the sensor.ioctl that lets you execute custom lepton commands?

Anyway, as for manual FFC mode. I have no idea. Every time I’ve played with that the system stops working.

You generally have to deal with the FLIR Lepton doing FFC whenever it wants. FLIR kinda designed these sensors for just raw video output use. So, while they can be used for machine vision, they weren’t optimized to give a video feed without pauses.
