Skip to content

Commit

Permalink
Added command "QUAD PIXEL DRIVE" for PT-PQxxx projectors
Browse files Browse the repository at this point in the history
  • Loading branch information
peschuster committed Oct 23, 2023
1 parent 424cc44 commit f523b58
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export const BlankingLeftCommand = new GenericCommand('BL', 'BlankingLeft', new
export const CustomMaskingCommand = new GenericCommand('XX', 'CustomMasking', new EnumConverter<CustomMasking>(), { subname: 'MSKI1' })
export const EdgeBlendingCommand = new GenericCommand('XX', 'EdgeBlending', new EnumConverter<EdgeBlending>(), { subname: 'EDBI0' })
export const EdgeBlendingMarkerCommand = new GenericCommand('GM', 'EdgeBlendingMarker', DefaultBooleanConverter, { setPrefix: 'V' })
export const QuadPixelDriveCommand = new GenericCommand('XX', 'QuadPixelDrive', new BooleanConverter('+00001', '+00000'), { subname: 'QPDI1' })

export const InputGuideCommand = new GenericCommand('ID', 'InputGuide', DefaultBooleanConverter, { queryCommand: 'QDI', setPrefix: 'O' })

Expand Down
15 changes: 15 additions & 0 deletions src/__tests__/AsciiCommands.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,21 @@ test('EDGE BLENDING-MARKER-ON/OFF specification', () => {
expect(cmd.parseResponse('1')).toBe(true)
})

test('QUAD PIXEL DRIVE specification', () => {
const cmd = Command.QuadPixelDriveCommand

// Query
expect(cmd.getQueryCommand()).toBe('QVX:QPDI1')

// Set
expect(cmd.getSetCommand(false)).toBe('VXX:QPDI1=+00000')
expect(cmd.getSetCommand(true)).toBe('VXX:QPDI1=+00001')

// Parse
expect(cmd.parseResponse('QPDI1=+00000')).toBe(false)
expect(cmd.parseResponse('QPDI1=+00001')).toBe(true)
})

test('INPUT GUIDE specification', () => {
const cmd = Command.InputGuideCommand

Expand Down

0 comments on commit f523b58

Please sign in to comment.