Skip to content

Commit

Permalink
fix: Quantel: set ExecutionMode.SALVO for CANCELWAITING commands
Browse files Browse the repository at this point in the history
  • Loading branch information
nytamin committed Oct 3, 2024
1 parent 454021a commit ff443bb
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { CommandWithContext } from '../../..'
import { getResolvedState, resolveTimeline } from 'superfly-timeline'
import { DevicesDict } from '../../../service/devices'
import { setSoftJumpWaitTime } from '../connection'
import { ExecuteMode } from '../../../service/device'

async function getInitialisedQuantelDevice(clearMock?: jest.Mock) {
const dev = new QuantelDevice(getDeviceContext())
Expand Down Expand Up @@ -429,6 +430,7 @@ describe('Quantel Device', () => {
},
context: 'Clear all delayed out-transitions',
timelineObjId: '',
executeMode: ExecuteMode.SALVO,
},
{
command: {
Expand Down Expand Up @@ -496,6 +498,7 @@ describe('Quantel Device', () => {
},
context: 'Clear all delayed out-transitions',
timelineObjId: '',
executeMode: ExecuteMode.SALVO,
},
{
command: {
Expand Down Expand Up @@ -577,6 +580,7 @@ describe('Quantel Device', () => {
},
context: 'Clear all delayed out-transitions',
timelineObjId: '',
executeMode: ExecuteMode.SALVO,
},
{
command: {
Expand Down Expand Up @@ -663,6 +667,7 @@ describe('Quantel Device', () => {
},
context: 'Clear all delayed out-transitions',
timelineObjId: '',
executeMode: ExecuteMode.SALVO,
},
{
command: {
Expand Down Expand Up @@ -749,6 +754,7 @@ describe('Quantel Device', () => {
},
context: 'Clear all delayed out-transitions',
timelineObjId: '',
executeMode: ExecuteMode.SALVO,
},
{
command: {
Expand Down Expand Up @@ -819,6 +825,7 @@ describe('Quantel Device', () => {
},
context: 'Clear all delayed out-transitions',
timelineObjId: '',
executeMode: ExecuteMode.SALVO,
},
{
command: {
Expand Down Expand Up @@ -880,6 +887,7 @@ describe('Quantel Device', () => {
},
context: 'Clear all delayed out-transitions',
timelineObjId: '',
executeMode: ExecuteMode.SALVO,
},
{
command: {
Expand Down Expand Up @@ -968,6 +976,7 @@ describe('Quantel Device', () => {
},
context: 'Clear all delayed out-transitions',
timelineObjId: '',
executeMode: ExecuteMode.SALVO,
},
{
command: {
Expand Down Expand Up @@ -1037,6 +1046,7 @@ describe('Quantel Device', () => {
},
context: 'Clear all delayed out-transitions',
timelineObjId: '',
executeMode: ExecuteMode.SALVO,
},
{
command: {
Expand Down Expand Up @@ -1132,6 +1142,7 @@ describe('Quantel Device', () => {
},
context: 'Clear all delayed out-transitions',
timelineObjId: '',
executeMode: ExecuteMode.SALVO,
},
{
command: {
Expand Down Expand Up @@ -1208,6 +1219,7 @@ describe('Quantel Device', () => {
},
context: 'Clear all delayed out-transitions',
timelineObjId: '',
executeMode: ExecuteMode.SALVO,
},
{
command: {
Expand All @@ -1217,6 +1229,7 @@ describe('Quantel Device', () => {
},
context: 'Clear all delayed out-transitions',
timelineObjId: '',
executeMode: ExecuteMode.SALVO,
},
{
command: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { QuantelOutTransition } from 'timeline-state-resolver-types'
import { QuantelCommandWithContext } from '.'
import { QuantelCommand, QuantelCommandType, QuantelState, QuantelStatePort, QuantelStatePortClip } from './types'
import _ = require('underscore')
import { ExecuteMode } from '../../service/device'

const IDEAL_PREPARE_TIME = 1000
const PREPARE_TIME_WAIT = 50
Expand Down Expand Up @@ -129,6 +130,8 @@ export function diffStates(
},
timelineObjId: '',
context: 'Clear all delayed out-transitions',
// These must be SALVO, so that they are executed first thing, and not get stuck behind a delayed sequential command.
executeMode: ExecuteMode.SALVO,
})
}

Expand Down
2 changes: 1 addition & 1 deletion packages/timeline-state-resolver/src/service/devices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export const DevicesDict: Record<ImplementedServiceDeviceTypes, DeviceEntry> = {
deviceClass: MultiOSCMessageDevice,
canConnect: false,
deviceName: (deviceId: string) => 'MultiOSC ' + deviceId,
executionMode: () => 'salvo',
executionMode: () => ExecuteMode.SALVO,
},
[DeviceType.PANASONIC_PTZ]: {
deviceClass: PanasonicPtzDevice,
Expand Down

0 comments on commit ff443bb

Please sign in to comment.