fixed launch

This commit is contained in:
IDONTSUDO 2024-09-23 14:18:48 +03:00
parent c0a23c31f7
commit e2cd7af032
4 changed files with 42 additions and 10 deletions

View file

@ -177,6 +177,14 @@ export class BTAction implements IBTAction {
export class Launch implements ILaunch {
@IsString()
executable: string;
@IsString()
package: string;
constructor(executable: string, plage: string) {
this.executable = executable;
this.package = plage;
}
static empty = () => new Launch("", "");
}
export class Ros2 implements IRos2 {
@IsString()
@ -224,11 +232,14 @@ export class SkillModel extends ValidationModel implements ISkill {
@Type(() => BtActionViewModel)
BTAction: BtActionViewModel[];
topicsOut: TopicViewModel[] = [];
@Type(() => Launch)
Launch: Launch;
static empty() {
const skillModel = new SkillModel();
skillModel.BTAction = [];
skillModel.SkillPackage = SkillPackage.empty();
skillModel.Module = Module.empty();
skillModel.Launch = Launch.empty();
return skillModel;
}
public static isEmpty(skill: SkillModel): Result<void, SkillModel> {
@ -477,4 +488,4 @@ export class Skills {
() => Result.error(false)
);
}