Repository navigation
rostelecom-ipc8232swc-we: drive the status LEDs (red power, blue net) - #201
Conversation
The profile mapped the two status LEDs in gpio.conf (led1=10 red, led2=25 blue) but nothing on a majestic image reads gpio.conf, so the only thing touching them was muxes.sh pinning both high under a "set leds power off" comment that in fact left both solid on -- the LEDs are active high, so "gpio set" lights them. Give them the usual boot/ready behaviour, matching the stock firmware's own map (GPIO10 = red "power", GPIO25 = blue "net"): S01leds lights the power LED and holds the net LED off while booting; S99leds lights the net LED once boot reaches its end, so a lit blue LED means the camera is up. Both honour led_disabled=1 (both off) like the LED scripts on other OpenIPC cameras, and go off on shutdown. muxes.sh no longer touches them. IR-cut (irCutPin1/2 63/67), the IR illuminator (backlightPin 72) and the speaker (speakerPin 28) were already correct in customizer.sh and work on majestic's defaults (irCut/backlight auto, day/night by picture); this only adds the missing LED behaviour. Hardware tested on the lab IPC8232SWC-WE (Hi3516EV300, ov2735). Running the two scripts on it stepped the LEDs red-only -> red+blue and read the GPIO values back at each step; GPIO10/25 drive on this board.
|
/review |
Code Review by Qodo
1.
|
…sabled Review (#201): S01leds lit the red power LED unconditionally, so with led_disabled=1 it stayed on through boot until S99leds cleared it, and lit again if S01leds was run by hand. The early script honours led_disabled now too: both LEDs stay dark from the start when it is set. Tested on the lab IPC8232SWC-WE (Hi3516EV300, ov2735): led_disabled unset -> red=1 blue=0; led_disabled=1 -> red=0 blue=0.
|
Fixed in 1782821: |
Problem
The profile maps the two status LEDs in
gpio.conf(led1=10red,led2=25blue), butnothing on a majestic image reads
gpio.conf, so the LEDs were inert. The only thing touchingthem was
muxes.sh, which pinned both high under a### set leds power off ###comment that infact left them solid on: the LEDs are active high, so
gpio setlights them.Change
Drive them the usual boot/ready way, matching the stock firmware's own hardware map
(GPIO10 = red "power", GPIO25 = blue "net"):
S01leds— boot: power LED on, net LED off.S99leds— ready: net LED on once boot reaches its end, so a lit blue LED means the camera isup. Both off when
led_disabled=1, like the LED scripts on other OpenIPC cameras, and off onshutdown.
muxes.shno longer touches them.IR-cut (
irCutPin1/263/67), the IR illuminator (backlightPin72) and the speaker(
speakerPin28) were already correct incustomizer.shand work on majestic's defaults(
irCut/backlightauto, day/night by picture); this only adds the missing LED behaviour.Hardware tested on
The lab IPC8232SWC-WE (Hi3516EV300, ov2735). Running the two scripts on it:
red=1 blue=1S01leds start→red=1 blue=0(power only)S99leds start→red=1 blue=1(power + net)reading the GPIO values back at each step; GPIO10/25 drive on this board. IR-cut/day-night is
live on the same camera — majestic holds the night IQ sections for the next switch.