Skip to content

Commit

Permalink
Update platform-generator.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
sca075 authored Nov 26, 2023
1 parent 0261df3 commit 29b3181
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/model/generators/platform-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,18 @@ export class PlatformGenerator {
return undefined;
}

public static getPedefinedZonesTemplate(platform: string): string | undefined {
const platformTemplate = this.getPlatformTemplate(platform);
for (const templateName in platformTemplate.map_modes.templates) {
const template = platformTemplate.map_modes.templates[templateName];
if (template.selection_type === SelectionType[SelectionType.PREDEFINED_RECTANGLE]) {
console.log("got template:", templateName);
return templateName;
}
}
return undefined;
}

public static getCalibration(platform: string | undefined): CalibrationPoint[] | undefined {
return this.getPlatformTemplate(PlatformGenerator.getPlatformName(platform)).calibration_points;
}
Expand All @@ -170,4 +182,5 @@ export class PlatformGenerator {
} as unknown as PlatformTemplate)
);
}

}

0 comments on commit 29b3181

Please sign in to comment.