Skip to content

Commit

Permalink
Merge branch 'main' into deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
davwheat committed Oct 28, 2023
2 parents 7bec277 + 227d8ff commit cdcef28
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/announcement-data/systems/stations/KeTechPhil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,11 @@ export default class KeTechPhil extends StationAnnouncementSystem {
return files
}

private async getCallingPointsWithSplits(callingPoints: CallingAtPoint[], overallLength: number): Promise<AudioItem[]> {
private async getCallingPointsWithSplits(
callingPoints: CallingAtPoint[],
terminatingStation: string,
overallLength: number,
): Promise<AudioItem[]> {
const files: AudioItem[] = []

// If there are no splits, return an empty array
Expand Down Expand Up @@ -593,7 +597,7 @@ export default class KeTechPhil extends StationAnnouncementSystem {
break
}

const aPortionStops = new Set(stopsAfterFormationChange.map(s => s.crsCode))
const aPortionStops = new Set([...stopsAfterFormationChange.map(s => s.crsCode), terminatingStation])
const bPortionStops = new Set(dividePoint.splitCallingPoints?.map(s => s.crsCode) ?? [])
const anyPortionStops = new Set([
...stopsUntilFormationChange.map(s => s.crsCode),
Expand Down Expand Up @@ -646,7 +650,7 @@ export default class KeTechPhil extends StationAnnouncementSystem {
private async getCallingPoints(callingPoints: CallingAtPoint[], terminatingStation: string, overallLength: number): Promise<AudioItem[]> {
const files: AudioItem[] = []

const callingPointsWithSplits = await this.getCallingPointsWithSplits(callingPoints, overallLength)
const callingPointsWithSplits = await this.getCallingPointsWithSplits(callingPoints, terminatingStation, overallLength)

if (callingPointsWithSplits.length !== 0) {
files.push({ id: 'm.calling at', opts: { delayStart: 750 } }, ...callingPointsWithSplits)
Expand Down

0 comments on commit cdcef28

Please sign in to comment.