Skip to content

Commit

Permalink
Merge pull request #33 from RogerHardiman/master
Browse files Browse the repository at this point in the history
Use Pan-Tilt-HAT driver 1.1.0
  • Loading branch information
RogerHardiman authored May 16, 2017
2 parents 0e77461 + a8cd976 commit a374b82
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lib/PTZDriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,11 @@ class PTZDriver {
if (pan_speed < 0) pan_speed = 0;
if (tilt_speed < 0) tilt_speed = 0;

if (p > 0) this.pan_tilt_hat.pan_left(pan_speed);
if (p < 0) this.pan_tilt_hat.pan_right(pan_speed);
if (p < 0) this.pan_tilt_hat.pan_left(pan_speed);
if (p > 0) this.pan_tilt_hat.pan_right(pan_speed);
if (p == 0) this.pan_tilt_hat.pan_right(0); // stop
if (t > 0) this.pan_tilt_hat.tilt_down(tilt_speed);
if (t < 0) this.pan_tilt_hat.tilt_up(tilt_speed);
if (t < 0) this.pan_tilt_hat.tilt_down(tilt_speed);
if (t > 0) this.pan_tilt_hat.tilt_up(tilt_speed);
if (t == 0) this.pan_tilt_hat.tilt_down(0); // stop
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"xml2js":"0.4.16",
"tenx-usb-missile-launcher-driver":"^0.2.0",
"node-pelcod":"^0.2.0",
"pan-tilt-hat":"^1.0.0",
"pan-tilt-hat":"^1.1.0",
"serialport":"^4.0.1",
"ip":"^1.1.3"
},
Expand Down

0 comments on commit a374b82

Please sign in to comment.