Skip to content

Commit

Permalink
Merge branch 'feat/sisyfos-bbc-enhancements' into release52
Browse files Browse the repository at this point in the history
  • Loading branch information
nytamin committed Sep 23, 2024
2 parents d182f1f + d7a2d3b commit 58cfbb2
Show file tree
Hide file tree
Showing 7 changed files with 248 additions and 92 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"build:main": "cd packages/timeline-state-resolver && yarn build",
"lint": "lerna exec yarn lint -- --",
"test": "lerna exec yarn test",
"test:changed": "lerna run --since origin/master --include-dependents test",
"unit": "lerna exec yarn unit",
"unitci": "lerna exec yarn unitci",
"watch": "lerna run --parallel build:main -- --watch --preserveWatchOutput",
Expand Down
6 changes: 6 additions & 0 deletions packages/quick-tsr/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ function reloadInput(changed?: { path: string; stats: fs.Stats }) {
currentInput.mappings = clone(newInput.mappings)
currentInput.timeline = clone(newInput.timeline)

// Check that layers are correct.
newInput.timeline.forEach((obj) => {
if (!newInput.mappings[obj.layer])
console.error(`Object ${obj.id} refers to a layer/mapping that does not exist: "${obj.layer}"`)
})

tsr.setTimelineAndMappings(newInput.timeline, newInput.mappings)
}
if (!_.isEqual(newInput.datastore, currentInput.datastore)) {
Expand Down
10 changes: 8 additions & 2 deletions packages/timeline-state-resolver-types/src/generated/sisyfos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,17 @@ export enum MappingSisyfosType {

export type SomeMappingSisyfos = MappingSisyfosChannel | MappingSisyfosChannelByLabel | MappingSisyfosChannels

export interface SetSisyfosChannelStatePayload {
channel: number
}

export enum SisyfosActions {
Reinit = 'reinit'
Reinit = 'reinit',
SetSisyfosChannelState = 'setSisyfosChannelState'
}
export interface SisyfosActionExecutionResults {
reinit: () => void
reinit: () => void,
setSisyfosChannelState: (payload: SetSisyfosChannelStatePayload) => void
}
export type SisyfosActionExecutionPayload<A extends keyof SisyfosActionExecutionResults> = Parameters<
SisyfosActionExecutionResults[A]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { DeviceType } from '..'

/*
* TRIGGERVALUE is used to SET_CHANNEL in Sisyfos
* When value is changed to a new value (e.g. Date.now()) Sisyfos will set the channel to
* the Current TSR State using setSisyfosChannel()
*/
export enum TimelineContentTypeSisyfos {
CHANNEL = 'channel',
CHANNELS = 'channels',
Expand All @@ -22,6 +27,9 @@ export interface SisyfosChannelOptions {
label?: string
visible?: boolean
fadeTime?: number
muteOn?: boolean
inputGain?: number
inputSelector?: number
}

export interface TimelineContentSisyfosTriggerValue extends TimelineContentSisyfos {
Expand All @@ -33,6 +41,7 @@ export interface TimelineContentSisyfosChannel extends TimelineContentSisyfos, S
type: TimelineContentTypeSisyfos.CHANNEL
resync?: boolean
overridePriority?: number // defaults to 0
triggerValue?: string
}
export interface TimelineContentSisyfosChannels extends TimelineContentSisyfos {
type: TimelineContentTypeSisyfos.CHANNELS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@
"name": "Reinitialize",
"destructive": false,
"timeout": 5000
},
{
"id": "setSisyfosChannelState",
"name": "SetSisyfosChannelState",
"payload": {
"type": "object",
"properties": {
"channel": {
"type": "number"
}
},
"additionalProperties": false,
"required": ["channel"]
},
"destructive": false,
"timeout": 5000
}
]
}
}
Loading

0 comments on commit 58cfbb2

Please sign in to comment.