Object can't get the right value of its property
My guess: controller_right.Motor = motor_right; makes a copy of motor_right. So you don't have the same class instance.

Basically Controller controller_right; calls default constructor which includes also default constructor for the StepMotor. And later all variables are copied into it by using default assigment operator, but still, it's not the same instance.