Exemplo n.º 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;
            }
        }
Exemplo n.º 2
0
        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;
        }