Fix qrscan for switcam-hs303-v2

This commit is contained in:
Signor Pellegrino
2024-08-04 22:40:52 +03:00
parent 04a01265a1
commit bb6fbf5328

View File

@@ -1,14 +1,14 @@
#!/bin/sh #!/bin/sh
gpio=? # COLOR led, hi3518ev200_lite_switcam-hs303-v2 gpio=56 # COLOR led, hi3518ev200_lite_switcam-hs303-v2
n=0 n=0
# gpio clear ${gpio} | logger -t gpio gpio set ${gpio} | logger -t gpio
while true ; do while true ; do
if [ "$n" -ge 30 ]; then if [ "$n" -ge 30 ]; then
logger -t qrscan "Recognition timeout exceeded, reboot camera and try again..." logger -t qrscan "Recognition timeout exceeded, reboot camera and try again..."
# gpio set ${gpio} | logger -t gpio gpio clear ${gpio} | logger -t gpio
exit 1 exit 1
fi fi
timeout 1 wget -q -O /tmp/image.jpg http://127.0.0.1/image.jpg timeout 1 wget -q -O /tmp/image.jpg http://127.0.0.1/image.jpg