This service dynamically adjusts the camera framerate based on CPU temperature to prevent overheating.
It is intended for OpenIPC cameras and has only been tested on Sigmastar SoCs.
- Reads CPU temperature from:
/sys/devices/virtual/mstar/msys/TEMP_R - Adjusts camera framerate via:
/proc/mi_modules/mi_sensor/mi_sensor0 - Uses a configuration file to define temperature → framerate rules.
Configuration file path:
/etc/temp_profile.conf
# <range> <fps> <scale> <update>
- min-max → Temperature range (°C)
- Example:
60-70
- Example:
- fps → Fixed FPS value (use
-if not set) - scale → Fraction of base FPS (use
-if not set) - update → Update interval in seconds
# <range> <fps> <scale> <update>
0-60 - 1 5
60-70 - 0.75 5
70-80 - 0.5 5
80-90 15 - 5
90-999 5 - 5This script is distributed as part of a custom package in the OpenIPC firmware build system.
- Clone and use my OpenIPC firmware repo that contains this package.
- Enable the package in your
defconfig:BR2_PACKAGE_THERMAL_THROTTLE_DB=y - Build the firmware and flash it to your camera.
The service will then be available inside the firmware.