Skip to content

Commit d2e5c31

Browse files
committed
Merge branch 'feat/R51-live-status-gateway-on-R50' into release51
2 parents 09cfa00 + 52fa54e commit d2e5c31

File tree

34 files changed

+163
-85
lines changed

34 files changed

+163
-85
lines changed

meteor/CHANGELOG.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,25 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5-
### [1.50.4](///compare/v1.50.3...v1.50.4) (2024-08-08)
5+
### [1.50.5](///compare/v1.50.4-LSG-updates...v1.50.5) (2024-08-08)
66

77

88
### Bug Fixes
99

10-
* compensate for piece preroll for adlibbed pieces SOFIE-3369 ([#1236](undefined/undefined/undefined/issues/1236)) c8f7c42
11-
* rundown timing drifting when playing parts with preroll SOFIE-3291 ([#1234](undefined/undefined/undefined/issues/1234)) a444857
12-
* unexpected timeline updates while playing final part in rundown SOFIE-3371 ([#1237](undefined/undefined/undefined/issues/1237)) 393f0c1
10+
* compensate for piece preroll for adlibbed pieces SOFIE-3369 ([#1236](undefined/undefined/undefined/issues/1236)) 195a7d9
11+
* rundown timing drifting when playing parts with preroll SOFIE-3291 ([#1234](undefined/undefined/undefined/issues/1234)) beee11a
12+
* unexpected timeline updates while playing final part in rundown SOFIE-3371 ([#1237](undefined/undefined/undefined/issues/1237)) 0fe74b4
13+
14+
### [1.50.4](https://github.com/nrkno/sofie-core/compare/v1.50.3-LSG-updates...v1.50.4) (2024-07-30)
15+
16+
17+
### Bug Fixes
18+
19+
* further improve stringifyError ([0233073](https://github.com/nrkno/sofie-core/commit/02330735fd4f3b03f9bff84e4c41fb9199a4623e))
20+
* improve error logging: use stringifyError() ([8da63de](https://github.com/nrkno/sofie-core/commit/8da63dec44915439ea436eee9697f3774241537b))
21+
* **LSG:** Token "examples" does not exist when running `yarn gendocs` ([a0ea9b4](https://github.com/nrkno/sofie-core/commit/a0ea9b48997fe39e8db5ababef744c103a68509f))
22+
* make stringifyError handle UserError better ([e2ecc7e](https://github.com/nrkno/sofie-core/commit/e2ecc7eb48b9ad6c0d95b299d954abac577e70a7))
23+
* refactor VirtualElement to be a FC ([bf81baf](https://github.com/nrkno/sofie-core/commit/bf81baf9ff520ad6a9fc9b6378ce6ceeac320645))
1324

1425
### [1.50.3](https://github.com/nrkno/sofie-core/compare/v1.50.2...v1.50.3) (2024-06-24)
1526

meteor/client/ui/Prompter/PrompterView.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ interface PrompterConfig {
5252
joycon_rangeNeutralMin?: number
5353
joycon_rangeNeutralMax?: number
5454
joycon_rangeFwdMax?: number
55+
joycon_rightHandOffset?: number
5556
pedal_speedMap?: number[]
5657
pedal_reverseSpeedMap?: number[]
5758
pedal_rangeRevMin?: number
@@ -147,6 +148,7 @@ export class PrompterViewContent extends React.Component<Translated<IProps & ITr
147148
joycon_rangeNeutralMin: parseInt(firstIfArray(queryParams['joycon_rangeNeutralMin']) as string, 10) || undefined,
148149
joycon_rangeNeutralMax: parseInt(firstIfArray(queryParams['joycon_rangeNeutralMax']) as string, 10) || undefined,
149150
joycon_rangeFwdMax: parseInt(firstIfArray(queryParams['joycon_rangeFwdMax']) as string, 10) || undefined,
151+
joycon_rightHandOffset: parseInt(firstIfArray(queryParams['joycon_rightHandOffset']) as string, 10) || undefined,
150152
pedal_speedMap:
151153
queryParams['pedal_speedMap'] === undefined
152154
? undefined

meteor/client/ui/Prompter/controller/joycon-device.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export class JoyConController extends ControllerAbstract {
1717
private rangeNeutralMin = -0.25 // pedal "back" position where reverse-range transistions to the neutral x
1818
private rangeNeutralMax = 0.25 // pedal "front" position where scrolling starts, the 0 speed origin
1919
private rangeFwdMax = 1 // pedal "all front" position where scrolling is maxed out
20+
private rightHandOffset = 1.4 // factor increased by 1.4 to account for the R joystick being less sensitive than L
2021
private speedMap = [1, 2, 3, 4, 5, 8, 12, 30]
2122
private reverseSpeedMap = [1, 2, 3, 4, 5, 8, 12, 30]
2223
private deadBand = 0.25
@@ -40,6 +41,7 @@ export class JoyConController extends ControllerAbstract {
4041
this.rangeNeutralMin = view.configOptions.joycon_rangeNeutralMin || this.rangeNeutralMin
4142
this.rangeNeutralMax = view.configOptions.joycon_rangeNeutralMax || this.rangeNeutralMax
4243
this.rangeFwdMax = view.configOptions.joycon_rangeFwdMax || this.rangeFwdMax
44+
this.rightHandOffset = view.configOptions.joycon_rightHandOffset || this.rightHandOffset
4345
this.speedMap = view.configOptions.joycon_speedMap || this.speedMap
4446
this.reverseSpeedMap = view.configOptions.joycon_reverseSpeedMap || this.reverseSpeedMap
4547
this.deadBand = Math.min(Math.abs(this.rangeNeutralMin), Math.abs(this.rangeNeutralMax))
@@ -249,8 +251,8 @@ export class JoyConController extends ControllerAbstract {
249251
if (joycon.mode === 'L') {
250252
lastSeenSpeed = joycon.axes[0] * -1 // in this mode, L is "negative"
251253
} else if (joycon.mode === 'R') {
252-
lastSeenSpeed = joycon.axes[0] * 1.4 // in this mode, R is "positive"
253-
// factor increased by 1.4 to account for the R joystick being less sensitive than L
254+
lastSeenSpeed = joycon.axes[0] * this.rightHandOffset // in this mode, R is "positive"
255+
// rightHandOffset allows for different rates between the two controllers
254256
}
255257
this.timestampOfLastUsedJoyconInput = joycon.timestamp
256258
}
@@ -260,8 +262,8 @@ export class JoyConController extends ControllerAbstract {
260262
if (Math.abs(joycon.axes[1]) > this.deadBand) {
261263
lastSeenSpeed = joycon.axes[1] * -1 // in this mode, we are "negative" on both sticks....
262264
} else if (Math.abs(joycon.axes[3]) > this.deadBand) {
263-
lastSeenSpeed = joycon.axes[3] * -1.4 // in this mode, we are "negative" on both sticks....
264-
// factor increased by 1.4 to account for the R joystick being less sensitive than L
265+
lastSeenSpeed = joycon.axes[3] * this.rightHandOffset * -1 // in this mode, we are "negative" on both sticks....
266+
// rightHandOffset allows for different rates between the two controllers
265267
}
266268
this.timestampOfLastUsedJoyconInput = joycon.timestamp
267269
}

meteor/client/ui/Settings/components/GenericDeviceSettingsComponent.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { JSONBlobParse } from '@sofie-automation/shared-lib/dist/lib/JSONBlob'
99
import { PeripheralDevices } from '../../../collections'
1010
import { MeteorCall } from '../../../../lib/api/methods'
1111
import { PeripheralDeviceId } from '@sofie-automation/corelib/dist/dataModel/Ids'
12+
import { stringifyError } from '@sofie-automation/shared-lib/dist/lib/stringifyError'
1213

1314
interface IGenericDeviceSettingsComponentProps {
1415
device: PeripheralDevice
@@ -39,7 +40,7 @@ export function GenericDeviceSettingsComponent({
3940
}
4041
setDebugStates(states)
4142
})
42-
.catch((err) => console.log(`Error fetching device states: ${err}`))
43+
.catch((err) => console.log(`Error fetching device states: ${stringifyError(err)}`))
4344
}, 1000)
4445

4546
return () => {

meteor/client/ui/Status/SystemStatus.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import { ClientAPI } from '../../../lib/api/client'
3939
import { catchError } from '../../lib/lib'
4040
import { logger } from '../../../lib/logging'
4141
import { CorelibPubSub } from '@sofie-automation/corelib/dist/pubsub'
42+
import { stringifyError } from '@sofie-automation/shared-lib/dist/lib/stringifyError'
4243

4344
interface IDeviceItemProps {
4445
parentDevice: PeripheralDevice | null
@@ -596,7 +597,7 @@ const SystemStatusContent = reacti18next.withTranslation()(
596597
deviceDebugState: states,
597598
})
598599
})
599-
.catch((err) => console.log(`Error fetching device states: ${err}`))
600+
.catch((err) => console.log(`Error fetching device states: ${stringifyError(err)}`))
600601
}
601602
}
602603
}

meteor/lib/clientUserAction.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,10 @@ export function eventContextForLog(e: any): [string, Time] {
269269
str = e.type
270270
}
271271
if (!str) {
272-
logger.error(
273-
'Could not create context in eventContextForLog, because provided event had no identifiable type',
274-
e
272+
logger.warn(
273+
`Could not create context in eventContextForLog, because provided event had no identifiable type: ${JSON.stringify(
274+
e
275+
)}, stack: ${new Error().stack}`
275276
)
276277
str = 'N/A'
277278
}

meteor/server/api/deviceTriggers/observer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { StudioDeviceTriggerManager } from './StudioDeviceTriggerManager'
1717
import { StudioObserver } from './StudioObserver'
1818
import { Studios } from '../../collections'
1919
import { ReactiveCacheCollection } from '../../publications/lib/ReactiveCacheCollection'
20+
import { stringifyError } from '@sofie-automation/shared-lib/dist/lib/stringifyError'
2021

2122
type ObserverAndManager = {
2223
observer: StudioObserver
@@ -34,8 +35,7 @@ Meteor.startup(() => {
3435

3536
function workInQueue(fnc: () => Promise<void>) {
3637
jobQueue.add(fnc).catch((e) => {
37-
logger.error(`Error in DeviceTriggers Studio observer reaction: ${e}`)
38-
logger.error(e)
38+
logger.error(`Error in DeviceTriggers Studio observer reaction: ${stringifyError(e)}`)
3939
})
4040
}
4141

meteor/server/api/ingest/lib.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ function updateDeviceLastDataReceived(deviceId: PeripheralDeviceId) {
139139
lastDataReceived: getCurrentTime(),
140140
},
141141
}).catch((err) => {
142-
logger.error(`Error in updateDeviceLastDataReceived "${deviceId}": ${err}`)
142+
logger.error(`Error in updateDeviceLastDataReceived "${deviceId}": ${stringifyError(err)}`)
143143
})
144144
}
145145

meteor/server/api/ingest/packageInfo.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { ExpectedPackageId, RundownId } from '@sofie-automation/corelib/dist/dat
1616
import { Rundown } from '@sofie-automation/corelib/dist/dataModel/Rundown'
1717
import { QueueStudioJob } from '../../worker/worker'
1818
import { StudioJobs } from '@sofie-automation/corelib/dist/worker/studio'
19+
import { stringifyError } from '@sofie-automation/shared-lib/dist/lib/stringifyError'
1920

2021
export async function onUpdatedPackageInfo(packageId: ExpectedPackageId, _doc: PackageInfoDB | null): Promise<void> {
2122
logger.info(`PackageInfo updated "${packageId}"`)
@@ -68,7 +69,9 @@ function onUpdatedPackageInfoForRundownDebounce(pkg: ExpectedPackageFromRundown
6869
if (packageIds) {
6970
pendingRundownPackageUpdates.delete(pkg.rundownId)
7071
onUpdatedPackageInfoForRundown(pkg.rundownId, packageIds).catch((e) => {
71-
logger.error(`Updating ExpectedPackages for Rundown "${pkg.rundownId}" failed: ${e}`)
72+
logger.error(
73+
`Updating ExpectedPackages for Rundown "${pkg.rundownId}" failed: ${stringifyError(e)}`
74+
)
7275
})
7376
}
7477
},
@@ -114,7 +117,9 @@ function onUpdatedPackageInfoForBucketItemDebounce(
114117
externalId: pkg.pieceExternalId,
115118
}).catch((err) => {
116119
logger.error(
117-
`Updating ExpectedPackages for Bucket "${pkg.bucketId}" Item "${pkg.pieceExternalId}" failed: ${err}`
120+
`Updating ExpectedPackages for Bucket "${pkg.bucketId}" Item "${
121+
pkg.pieceExternalId
122+
}" failed: ${stringifyError(err)}`
118123
)
119124
})
120125
},
@@ -131,7 +136,9 @@ function onUpdatedPackageInfoForStudioBaselineDebounce(pkg: ExpectedPackageDBFro
131136
await job.complete
132137
})
133138
.catch((err) => {
134-
logger.error(`Updating ExpectedPackages for StudioBaseline "${pkg.studioId}" failed: ${err}`)
139+
logger.error(
140+
`Updating ExpectedPackages for StudioBaseline "${pkg.studioId}" failed: ${stringifyError(err)}`
141+
)
135142
})
136143
},
137144
1000

meteor/server/api/peripheralDevice/executeFunction.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { createManualPromise, getCurrentTime, getRandomId } from '../../../lib/l
44
import { PeripheralDeviceCommands } from '../../collections'
55
import { logger } from '../../logging'
66
import { TSR } from '@sofie-automation/blueprints-integration'
7+
import { stringifyError } from '@sofie-automation/shared-lib/dist/lib/stringifyError'
78

89
export async function executePeripheralDeviceFunctionWithCustomTimeout(
910
deviceId: PeripheralDeviceId,
@@ -70,7 +71,9 @@ export async function executePeripheralDeviceFunctionWithCustomTimeout(
7071

7172
observer?.stop()
7273
PeripheralDeviceCommands.removeAsync(cmdId).catch((e) => {
73-
logger.error(`Cleanup PeripheralDeviceCommand "${commandId}" document failed: ${e}`)
74+
logger.error(
75+
`Cleanup PeripheralDeviceCommand "${commandId}" document failed: ${stringifyError(e)}`
76+
)
7477
})
7578
}
7679

@@ -118,7 +121,7 @@ export async function executePeripheralDeviceFunctionWithCustomTimeout(
118121

119122
const doCheckReply = () => {
120123
checkReply().catch((e) => {
121-
logger.error(`PeripheralDeviceCommand "${commandId}" check failed: ${e}`)
124+
logger.error(`PeripheralDeviceCommand "${commandId}" check failed: ${stringifyError(e)}`)
122125
})
123126
}
124127

0 commit comments

Comments
 (0)