Merge branch 'gtxaspec:master' into master

This commit is contained in:
virmaior
2022-07-16 21:20:06 +09:00
committed by GitHub
6 changed files with 58 additions and 10 deletions

View File

@@ -14,11 +14,38 @@ echo "CAR: e: forward right"
echo "CAR: z: reverse left"
echo "CAR: c: reverse right"
echo "CAR: x: all stop"
echo "CAR: use 1 to quit ASAP!"
echo "CAR: h: headlight on/off"
echo "CAR: j: irled on/off"
echo "CAR: b: honk"
echo -e ""
echo "CAR: 1: quit ASAP!"
echo -e ""
echo "Ready!"
headlight_state=false
irled_state=false
function headlight {
if [ "$headlight_state" = false ]; then
echo -ne "\xaa\x55\x43\x04\x1e\x01\x01\x65" > /dev/ttyUSB0
headlight_state=true
else
echo -ne "\xaa\x55\x43\x04\x1e\x02\x01\x66" > /dev/ttyUSB0
headlight_state=false
fi
}
function irled {
if [ "$irled_state" = false ]; then
cmd irled on
irled_state=true
else
cmd irled off
irled_state=false
fi
}
trap control_c SIGINT
control_c()
@@ -101,6 +128,15 @@ elif [ "$input" = "c" ]; then
elif [ "$input" = "c" ]; then
echo -ne "\xaa\x55\x43\x06\x29\x80\x80\x00\x02\x71" > /dev/ttyUSB0
elif [ "$input" = "h" ]; then
headlight
elif [ "$input" = "j" ]; then
irled
elif [ "$input" = "b" ]; then
/opt/wz_mini/bin/cmd aplay /opt/wz_mini/usr/share/audio/honk.wav 70 > /dev/null 2>&1 &
elif [ "$input" = "1" ]; then
#exit
echo -ne "\xaa\x55\x43\x06\x29\x80\x80\x00\x02\x71" > /dev/ttyUSB0

View File

@@ -479,8 +479,10 @@ fi
if [[ "$DISABLE_FW_UPGRADE" == "true" ]]; then
mkdir /tmp/Upgrade
mount -t tmpfs -o size=1,nr_inodes=1 none /tmp/Upgrade
echo -e "127.0.0.1 localhost \n127.0.0.1 wyze-upgrade-service.wyzecam.com" > /opt/wz_mini/tmp/.storage/hosts
mount --bind /opt/wz_mini/tmp/.storage/hosts /etc/hosts
#Setting this host causes iCamera to segfault, lets ignore it for now
#echo -e "127.0.0.1 localhost \n127.0.0.1 wyze-upgrade-service.wyzecam.com" > /opt/wz_mini/tmp/.storage/hosts
#mount --bind /opt/wz_mini/tmp/.storage/hosts /etc/hosts
/opt/wz_mini/bin/busybox inotifyd /opt/wz_mini/usr/bin/watch_up.sh /tmp:n > /dev/null 2>&1 &
else
mkdir /tmp/Upgrade
/opt/wz_mini/bin/busybox inotifyd /opt/wz_mini/usr/bin/watch_up.sh /tmp:n > /dev/null 2>&1 &
@@ -616,7 +618,7 @@ if [ -d "${1:-/opt/wz_mini/etc/rc.local.d}" ] ; then
for filename in $(find /opt/wz_mini/etc/rc.local.d/ -name "*.sh" | /opt/wz_mini/bin/busybox sort) ; do
if [ -f "${filename}" ] && [ -x "${filename}" ]; then
echo "running ${filename}"
"${filename}"
"${filename}" &
fi
done
fi

View File

@@ -1 +1 @@
Thu Jul 14 04:01:23 PM PDT 2022
Fri Jul 15 04:47:54 PM PDT 2022

View File

@@ -2,6 +2,10 @@
DEBUG=false
export WZMINI_CFG=/opt/wz_mini/wz_mini.conf
[ -f $WZMINI_CFG ] && source $WZMINI_CFG
if [ "$DEBUG" == "true" ]; then
if [ -L /dev/fd ]; then
@@ -26,6 +30,11 @@ case "$event" in
set -x
if [[ "$DISABLE_FW_UPGRADE" == "true" ]]; then
#Reboot as soon as we see "img", this means an update is incoiming
reboot
fi
#hook the v2
if cat /params/config/.product_config | grep WYZEC1-JZ; then
while [ ! -f /tmp/Upgrade/upgraderun.sh ]

Binary file not shown.