diff --git a/firmware_mod/run.sh b/firmware_mod/run.sh index 7c83068..2a41fe0 100755 --- a/firmware_mod/run.sh +++ b/firmware_mod/run.sh @@ -158,12 +158,6 @@ blue_led on ## Load motor driver module: insmod /driver/sample_motor.ko -# Don't calibrate the motors for now as for newer models the endstops don't work: -# motor hcalibrate -# motor vcalibrate - -# calibrate,compatible newer models.(But the old DAFANG does not work.) -# motor calibrate ## Determine the image sensor model: insmod /system/sdcard/driver/sinfo.ko diff --git a/firmware_mod/scripts/common_functions.sh b/firmware_mod/scripts/common_functions.sh index 2465596..083f2ec 100755 --- a/firmware_mod/scripts/common_functions.sh +++ b/firmware_mod/scripts/common_functions.sh @@ -171,18 +171,10 @@ motor(){ /system/sdcard/bin/motor -d r -s "$steps" update_motor_pos $steps ;; - vcalibrate) + reset_pos_count) /system/sdcard/bin/motor -d v -s "$steps" update_motor_pos $steps ;; - hcalibrate) - /system/sdcard/bin/motor -d h -s "$steps" - update_motor_pos $steps - ;; - calibrate) - /system/sdcard/bin/motor -d f -s "$steps" - update_motor_pos $steps - ;; status) if [ "$2" = "horizontal" ]; then /system/sdcard/bin/motor -d u -s 0 | grep "x:" | awk '{print $2}' diff --git a/firmware_mod/www/cgi-bin/action.cgi b/firmware_mod/www/cgi-bin/action.cgi index 0c0e93f..a3be94f 100755 --- a/firmware_mod/www/cgi-bin/action.cgi +++ b/firmware_mod/www/cgi-bin/action.cgi @@ -144,23 +144,12 @@ if [ -n "$F_cmd" ]; then motor down $F_val ;; - motor_vcalibrate) - motor vcalibrate $F_val - ;; - - motor_hcalibrate) - motor hcalibrate $F_val - ;; - motor_calibrate) - # Doesn't seem to work - # motor calibrate $F_val - # Current motor driver does not differentiate between horizontal and vertical calibration - motor vcalibrate $F_val + motor reset_pos_count $F_val ;; - + motor_PTZ) - /system/sdcard/scripts/PTZpresets.sh $F_x_axis $F_y_axis + /system/sdcard/scripts/PTZpresets.sh $F_x_axis $F_y_axis ;; audio_test)