Commit ad768409 authored by 957dd's avatar 957dd

Merge branch 'feature/ptr-SG' into 'master'

对云台左右进行了限位 See merge request !8
parents 3a0e7ead 75a6ad2c
No preview for this file type
......@@ -56,7 +56,7 @@ void PTZ_pwm_left() {
if(change_index>=1) {
change_index=0;
val_change -= 3;
if(val_change <= 0)val_change=0;
if(val_change <= 30)val_change=30;
pulse_width = calculate_pulse_width(val_change);
pulse=calculate_duty_cycle(pulse_width);
}
......@@ -71,7 +71,7 @@ void PTZ_pwm_right() {
if(change_index>=1) {
change_index=0;
val_change += 3;
if(val_change >= 270)val_change=270;
if(val_change >= 150)val_change=150;
pulse_width = calculate_pulse_width(val_change);
pulse=calculate_duty_cycle(pulse_width);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment