MyRobotLab / myrobotlab

Open Source Java Framework for Robotics and Creative Machine Control
Apache License 2.0
230 stars 108 forks source link

Servo doesn't use Servo config directly #1382

Open supertick opened 11 months ago

supertick commented 11 months ago

Describe the bug It takes an additional servo.apply(servoConfig) to change idleTimeout and probably more values.

To Reproduce Steps to reproduce the behavior:

    neck = Runtime.start("neck", "Servo");
    config = neck.getConfig();
    # change should immediately affect servo    
    config.idleTimeout = 5000;
    # legacy "mapping" to member vars requires "apply" to process
    neck.apply(config);
    # if the save was done without  the apply neck's idle timeout would be 3000
    neck.save();

Expected behavior A clear and concise description of what you expected to happen.

    config.idleTimeout = 5000;
    neck.save()
    # neck.yml idleTimeout should equal 5000 (without the need of apply)