timeline-state-resolver
Version:
Have timeline, control stuff
20 lines • 690 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.FocusCommand = void 0;
const enums_1 = require("../../enums");
const abstractCommand_1 = require("../abstractCommand");
class FocusCommand extends abstractCommand_1.ViscaCommand {
constructor(direction, speed = 0) {
super();
this.direction = direction;
this.speed = speed;
}
serialize() {
let data = this.direction;
if (data > enums_1.FocusDirection.NearStandard)
data = data + this.speed;
return Buffer.from([0x81, 0x01, 0x04, 0x08, data, 0xff]);
}
}
exports.FocusCommand = FocusCommand;
//# sourceMappingURL=focusCommand.js.map