コード例 #1
0
        internal void SetTargetKinematics(KinematicSolution kinematics, List <string> errors, List <string> warnings, ProgramTarget prevTarget)
        {
            this.Kinematics = kinematics;

            if (errors.Count == 0 && kinematics.Errors.Count > 0)
            {
                errors.Add($"Errors in target {this.Index} of robot {this.Group}:");
                errors.AddRange(kinematics.Errors);
            }

            if (warnings != null && prevTarget != null && prevTarget.Kinematics.Configuration != kinematics.Configuration)
            {
                this.ChangesConfiguration = true;
                warnings.Add($"Configuration changed to \"{kinematics.Configuration.ToString()}\" on target {this.Index} of robot {this.Group}");
            }
            else
            {
                this.ChangesConfiguration = false;
            }
        }
コード例 #2
0
ファイル: Target.cs プロジェクト: visose/Robots
        internal void SetTargetKinematics(KinematicSolution kinematics, List<string> errors, List<string> warnings, ProgramTarget prevTarget)
        {
            this.Kinematics = kinematics;

            if (errors != null && kinematics.Errors.Count > 0)
            {
                errors.Add($"Errors in target {this.Index} of robot {this.Group}:");
                errors.AddRange(kinematics.Errors);
            }

            if (warnings != null && prevTarget != null && prevTarget.Kinematics.Configuration != kinematics.Configuration)
            {
                this.ChangesConfiguration = true;
                warnings.Add($"Configuration changed to \"{kinematics.Configuration.ToString()}\" on target {this.Index} of robot {this.Group}");
            }
            else
                this.ChangesConfiguration = false;
        }