timeline-state-resolver
Version:
Have timeline, control stuff
21 lines • 955 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PanTiltDriveAbsoluteCommand = void 0;
const abstractCommand_1 = require("../abstractCommand");
class PanTiltDriveAbsoluteCommand extends abstractCommand_1.ViscaCommand {
constructor(panPosition, tiltPosition, panSpeed, tiltSpeed) {
super();
this.panPosition = panPosition;
this.tiltPosition = tiltPosition;
this.panSpeed = panSpeed;
this.tiltSpeed = tiltSpeed;
}
serialize() {
const buffer = Buffer.alloc(16);
buffer.writeBigUInt64BE(this.toBigIntWithZeroes(this.tiltPosition), 8);
buffer.writeBigUInt64BE(this.toBigIntWithZeroes(this.panPosition), 3);
return Buffer.from([0x81, 0x01, 0x06, 0x01, this.panSpeed, this.tiltSpeed, ...buffer.slice(6), 0xff]);
}
}
exports.PanTiltDriveAbsoluteCommand = PanTiltDriveAbsoluteCommand;
//# sourceMappingURL=panTiltDriveAbsoluteCommand.js.map