mirror of
https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks.git
synced 2025-09-08 23:20:48 +02:00
Add PTZ presets and other optimizations. (#389)
* add PTZperset function * Display asix to OSD * delete source * add motor_PTZ function * Motor adds f parameter (calibrate) and is compatible with the new version of DAFANG. * calibrate,compatible newer models. * OSD set POSY 0 * Wait for the previous command to run before running * Disable Statements That Cause MQTT Alerts * fix mqtt * Fixed issue where multi-tasking motor was not moved to the specified position and was interrupted * Add limit on the number of snapshots * Add OSD Display AXIS * Repair Limit Snapshot Number Does Not Take Effect.. * Enable log option * Keep the original time style * Keep default osd settings * Modify loger as a logger * Api.cgi is not in use * Clear the old DAFANG calibration failure code. New DAFANG Run the `/system/sdcard/bin/motor -d f` command to calibrate. Old and generous Please run `/system/sdcard/bin/motor -d h && /system/sdcard/bin/motor -d v` command to calibrate * Change the zero point of the motor calibration coordinate to the middle point of the motor. * Fix the coordinate display of the new motor command. * fix typo
This commit is contained in:
@@ -16,6 +16,10 @@ if [ "$save_snapshot" = true ] ; then
|
||||
if [ ! -d "$save_dir" ]; then
|
||||
mkdir -p $save_dir
|
||||
fi
|
||||
# Limit the number of snapshots
|
||||
if [[ $(ls $save_dir | wc -l) -ge $max_snapshots ]]; then
|
||||
rm -f "$save_dir/$(ls -l $save_dir | awk 'NR==2{print $9}')"
|
||||
fi
|
||||
/system/sdcard/bin/getimage > $save_dir/$filename &
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user