Skip to content

ak3918ev300l_lite_appix-sc03w: IR-cut pins the right way round, automatic day/night on - #271

Merged
openipc-ai merged 1 commit into
masterfrom
device/appix-sc03w-night
Nov 23, 2026
Merged

openipc-ai merged 1 commit into
masterfrom
device/appix-sc03w-night

Conversation

@openipc-ai

Copy link
Copy Markdown
Contributor

Follow-up to #269, from the owner's camera after a fresh flash of the merged profile with a wiped overlay (OpenIPC/majestic#380).

  • IR-cut: the filter moved the wrong way. Majestic pulses irCutPin1 for night and irCutPin2 for day. On this board those are 66 and 65, the other way round from the stock factory_cfg.ini's ircut_a/ircut_b order. With irCutPin1 66 / irCutPin2 65 the colourless night mode works, as reported.
  • Automatic day/night: nightMode.lightMonitor is off by default, so a fresh camera stayed in manual mode. With it on, covering the lens switches to night and uncovering it switches back to day, as reported on the same camera.

On that same flash: homing completes (gpiostep: homed, centred at 515/65), the Live page's pan/tilt directions are right, and Wi-Fi works.

…atic day/night on

On the owner's camera, flashed from the merged profile with a wiped
overlay (OpenIPC/majestic#380):
- The IR-cut filter moved the wrong way. Majestic pulses irCutPin1 for
  night and irCutPin2 for day, and on this board those are 66 and 65, the
  other way round from the stock factory_cfg.ini's ircut_a/ircut_b order.
  With irCutPin1 66 and irCutPin2 65 the colourless night mode works.
- Night mode stayed manual: nightMode.lightMonitor is off by default.
  With it on, covering the lens switches to night and uncovering it back to
  day, from the image processor's own exposure state.
@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

PR Summary by Qodo

Correct APPIX SC03-W IR-cut direction and enable automatic night mode

🐞 Bug fix ✨ Enhancement ⚙️ Configuration changes 🕐 Less than 10 minutes

Grey Divider

AI Description

• Swap the IR-cut pins so the filter moves correctly between day and night positions.
• Enable automatic day/night switching on fresh flashes of the camera profile.
Merge Risk 🟢 Low

Blast radius 🟢 Low 💥 1 capability

  • 1 affected end-to-end capability after fault-specific containment; implementation boundaries do not widen its functional scope.
  • IR-cut selection, IR illumination, white-light illumination, and day/night transitions are one bounded camera imaging behavior.
  • The changed configuration directly controls the same end-to-end outcome—whether the camera produces usable day or night imagery—rather than separate technical-layer capabilities.
  • Automatic monitoring is another entry path into the same bounded day/night imaging behavior.
  • It shares the IR-cut and illumination outcome with manual transitions, so it is not an independent functional scope or separate implementation-hop capability.
Sources

devices/ak3918ev300l_lite_appix-sc03w/general/overlay/usr/share/openipc/customizer.sh[32-36]

cli -s .nightMode.backlightPin 10
cli -s .nightMode.whiteLightPin 9
# Automatic day/night, off by default in majestic. On this camera covering
# the lens switches to night and uncovering it back to day.
cli -s .nightMode.lightMonitor true

devices/ak3918ev300l_lite_appix-sc03w/general/overlay/usr/share/openipc/customizer.sh[26-31]

# LEDs on 10, white light on 9. Majestic pulses irCutPin1 for night and
# irCutPin2 for day, and on this board that is 66 and 65 -- the other way
# round from the stock file's ircut_a/ircut_b order (confirmed on the
# camera, OpenIPC/majestic#380).
cli -s .nightMode.irCutPin1 66
cli -s .nightMode.irCutPin2 65
Behavioral complexity 🟢 Low 🧩 Straightforward

  • Before: the camera had board-specific IR-cut settings supplied by the customization script, with the old order based on the stock file.
  • After: the two configured pins are swapped to match the stated Majestic night/day pulse semantics.
  • New correctness condition: the two numeric settings must match the board's electrical behavior and Majestic's pin-role interpretation.
  • This is a direct configuration transformation using existing GPIO and nightMode infrastructure; no new algorithm, state machine, concurrency protocol, or compatibility branch is introduced.
Sources

devices/ak3918ev300l_lite_appix-sc03w/general/overlay/usr/share/openipc/customizer.sh[26-31]

# LEDs on 10, white light on 9. Majestic pulses irCutPin1 for night and
# irCutPin2 for day, and on this board that is 66 and 65 -- the other way
# round from the stock file's ircut_a/ircut_b order (confirmed on the
# camera, OpenIPC/majestic#380).
cli -s .nightMode.irCutPin1 66
cli -s .nightMode.irCutPin2 65
Potential damage 🟡 Medium 🩹 Recoverable

  • A wrong pin mapping plausibly causes incorrect optical filtering and degraded imagery, but the affected behavior is limited to this camera's day/night imaging.
  • The configuration can be corrected and the device reconfigured/restarted; reverting source code alone does not repair a value already written into the device configuration, and no automatic state-repair worker was found.
  • Recoverable by applying the corrected Majestic settings and restarting or re-running the supported customization path.
  • If the wrong mapping has already been written, a firmware rollback alone may leave the persisted runtime setting unchanged until configuration is rewritten.
Sources

devices/ak3918ev300l_lite_appix-sc03w/general/overlay/usr/share/openipc/customizer.sh[26-31]

# LEDs on 10, white light on 9. Majestic pulses irCutPin1 for night and
# irCutPin2 for day, and on this board that is 66 and 65 -- the other way
# round from the stock file's ircut_a/ircut_b order (confirmed on the
# camera, OpenIPC/majestic#380).
cli -s .nightMode.irCutPin1 66
cli -s .nightMode.irCutPin2 65
Assessed commit 6996005
Diagram

graph TD
  A["Image exposure"] --> B["Light monitor"] --> C["Day/night control"] --> D["IR-cut pins"] --> E["IR-cut filter"]
  F["Device customizer"] --> B
  F --> D
Loading
High-Level Assessment

Keep the verified pin mapping and light-monitor setting in the device-specific customizer. Relying on the stock firmware's pin order or Majestic's default monitoring setting would retain the observed failures.

Files changed (1) +9 / -3

Bug fix (1) +9 / -3
customizer.shFix IR-cut polarity and enable automatic day/night switching +9/-3

Fix IR-cut polarity and enable automatic day/night switching

• Assigns GPIO 66 to Majestic's night IR-cut pulse and GPIO 65 to its day pulse, correcting the filter's direction. Enables the light monitor so the camera switches modes automatically, and documents the camera-verified behavior.

devices/ak3918ev300l_lite_appix-sc03w/general/overlay/usr/share/openipc/customizer.sh

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can keep summaries lean with Findings visible per group, which tucks the rest behind a View link

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@openipc-ai
openipc-ai merged commit e3ebb26 into master Nov 23, 2026
7 checks passed
@openipc-ai
openipc-ai deleted the device/appix-sc03w-night branch November 23, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant