Skip to content

Commit

Permalink
feat: jog command
Browse files Browse the repository at this point in the history
  • Loading branch information
Balte de Wit committed Sep 21, 2019
1 parent bc05045 commit cbcd0cf
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export * from './configuration'
export * from './deviceInfo'
export * from './format'
export * from './goTo'
export * from './jog'
export * from './notify'
export * from './playCommand'
export * from './record'
Expand Down
25 changes: 25 additions & 0 deletions src/commands/jog.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { NamedMessage } from '../message'
import { AbstractCommandNoResponse } from './abstractCommand'

export class JogCommand extends AbstractCommandNoResponse {
timecode?: string

constructor (timecode?: string) {
super()

this.timecode = timecode
}

serialize () {
const res: NamedMessage = {
name: 'jog',
params: {}
}

if (this.timecode === undefined) throw new Error('JogCommand needs timecode')

res.params.timecode = this.timecode

return res
}
}

0 comments on commit cbcd0cf

Please sign in to comment.