S17motor: add startup motor position. Thanks @Grntrenchman

This commit is contained in:
gtxaspec 2023-09-20 16:19:10 -07:00
parent 1a1cd03a64
commit c4c10e65cd
5 changed files with 36 additions and 10 deletions

View File

@ -1,21 +1,39 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides:
# Short-Description: Disable Motor
# Description: Disable Motor on specified devices
# Short-Description: Set motor parameters
# Description: Disable Motor, or set specified motor position on boot on motorized devices.
### END INIT INFO
. /opt/wz_mini/etc/rc.common
. /opt/wz_mini/wz_mini.conf
motor_position() {
wait_for_icamera
if [ -n "$MOTOR_DEFAULT_X" ]; then
if [ -n "$MOTOR_DEFAULT_Y" ]; then
echo "Moving to user-defined default position"
cmd move $MOTOR_DEFAULT_X $MOTOR_DEFAULT_Y
else
echo "Default position not defined for Y-axis"
fi
else
echo "Default position not defined for X-axis"
fi
}
case "$1" in
start)
echo "#####$(basename "$0")#####"
if [[ "$DISABLE_MOTOR" == "true" ]]; then
if [[ "$MOTOR_DISABLE" == "true" ]]; then
echo "Motor Disabled"
touch /opt/wz_mini/tmp/.ms
else
echo "Motor enabled"
motor_position &
fi
;;

View File

@ -51,6 +51,11 @@ BONDING_FAIL_OVER_MAC="0"
#####ACCESSORIES#####
REMOTE_SPOTLIGHT="false"
####MOTOR OPTIONS####
MOTOR_DISABLE="false"
MOTOR_DEFAULT_X=""
MOTOR_DEFAULT_Y=""
#####VIDEO STREAM#####
RTSP_LOGIN="admin"
RTSP_PASSWORD=""
@ -101,7 +106,6 @@ DISABLE_FW_UPGRADE="false"
AUDIO_PROMPT_VOLUME="50"
ENABLE_MP4_WRITE="false"
NIGHT_DROP_DISABLE="false"
DISABLE_MOTOR="false"
ENABLE_FSCK_ON_BOOT="false"
ENABLE_CAR_DRIVER="false"
ENABLE_LOCAL_DNS="false"

View File

@ -1 +1 @@
Tue Sep 19 04:43:33 PM PDT 2023
Wed Sep 20 04:17:50 PM PDT 2023

View File

@ -51,6 +51,11 @@ BONDING_FAIL_OVER_MAC="0"
#####ACCESSORIES#####
REMOTE_SPOTLIGHT="false"
####MOTOR OPTIONS####
MOTOR_DISABLE="false"
MOTOR_DEFAULT_X=""
MOTOR_DEFAULT_Y=""
#####VIDEO STREAM#####
RTSP_LOGIN="admin"
RTSP_PASSWORD=""
@ -101,7 +106,6 @@ DISABLE_FW_UPGRADE="false"
AUDIO_PROMPT_VOLUME="50"
ENABLE_MP4_WRITE="false"
NIGHT_DROP_DISABLE="false"
DISABLE_MOTOR="false"
ENABLE_FSCK_ON_BOOT="false"
ENABLE_CAR_DRIVER="false"
ENABLE_LOCAL_DNS="false"

View File

@ -79,7 +79,7 @@ ce899168f0a576809238b338dec6a666 SD_ROOT/wz_mini/etc/init.d/S02tmpfs
e3034eac02d8eda9902ca9cf89f0a586 SD_ROOT/wz_mini/etc/inittab
840aa9c26726201f7cffbf001bee193a SD_ROOT/wz_mini/etc/uvc_jxf22.config
d41d8cd98f00b204e9800998ecf8427e SD_ROOT/wz_mini/etc/rc.local.d/.gitignore
e3cc25a56c79a3a6d9553ac69874ce54 SD_ROOT/wz_mini/etc/wz_mini.conf.dist
c2190e55d8672888d8083ec42200fb7c SD_ROOT/wz_mini/etc/wz_mini.conf.dist
4291fb00ec609b5b007ff9b3048e9248 SD_ROOT/wz_mini/etc/hosts
1a4f7adceeed7014e9e61fcd1f46d890 SD_ROOT/wz_mini/etc/rc.common
8b5e58acfcbb20034dc4873a08b45fd9 SD_ROOT/wz_mini/etc/profile
@ -87,7 +87,7 @@ e3cc25a56c79a3a6d9553ac69874ce54 SD_ROOT/wz_mini/etc/wz_mini.conf.dist
2407c1629b293e0646cd0dd0c21f245c SD_ROOT/wz_mini/etc/alsa/alsa.conf
00184c9b4016f437adcae60bae5b62ae SD_ROOT/wz_mini/etc/rc.d/S18fps
80650d58c240c642295448a72a49ad45 SD_ROOT/wz_mini/etc/rc.d/K01network
ca8d8d8a60b3dc255133151ba33e0eb3 SD_ROOT/wz_mini/etc/rc.d/S17motor
3fbad7406c24837d61c118e973b62ccc SD_ROOT/wz_mini/etc/rc.d/S17motor
03ca145794cedfe4748692dd6341839e SD_ROOT/wz_mini/etc/rc.d/S10firmware
5e81ec81999790b247ef2af25cc34cb6 SD_ROOT/wz_mini/etc/rc.d/K03rcd
ebfa49291afc96c4dd306101b7dec31c SD_ROOT/wz_mini/etc/rc.d/K02webcam
@ -190,7 +190,7 @@ b339aee882a5d1c943ad08e4282ec3fd SD_ROOT/wz_mini/usr/bin/iCamera-dbg
b10bdd54c56d8d8de2a27336f17285fe SD_ROOT/wz_mini/usr/bin/patch_icamera.sh
dafffcc1bd1e721d508400686338ceb8 SD_ROOT/wz_mini/usr/bin/imp_helper.sh
580b1b6e91e72b4a4fef7b21d8954403 SD_ROOT/wz_mini/usr/bin/getSensorType
c4b12036910a5942bd2636e71850be3b SD_ROOT/wz_mini/usr/bin/app.ver
2945f129fa73247a6ce5229938a2e4a9 SD_ROOT/wz_mini/usr/bin/app.ver
4c780f0455481d106d47d89f0ae04ed5 SD_ROOT/wz_mini/lib/uClibc.tar
9afeb088e4cbabbe0b04033b560204d0 SD_ROOT/wz_mini/lib/libimp.so
4100755cb6cc6e3b76da20c7e3690e16 SD_ROOT/wz_mini/lib/libalog.so
@ -340,7 +340,7 @@ c6a2e765996b4a8bfe351757785fb989 SD_ROOT/wz_mini/lib/modules/3.10.14__isvp_swan
46791b695c5acd7d813f2a7198790a8a SD_ROOT/wz_mini/lib/libcallback_t20.so
bd383994491e4bdca81788c168feb2eb SD_ROOT/wz_mini/lib/libasound.so.2
f6f0d5a9ebd916de6bdb9695067809ae SD_ROOT/wz_mini/lib/libaudioProcess.so
e3cc25a56c79a3a6d9553ac69874ce54 SD_ROOT/wz_mini/wz_mini.conf
c2190e55d8672888d8083ec42200fb7c SD_ROOT/wz_mini/wz_mini.conf
d41d8cd98f00b204e9800998ecf8427e SD_ROOT/wz_mini/tmp/.gitignore
a0c14688cda288ec6726e43b2ded2c09 v2_install/compile_image.sh
533fc156f7853d8b21dfbe51e6a4c02e v2_install/fw_tool.sh