#include "SynchronizedMotors.h" SynchronizedMotors::SynchronizedMotors(Motor *primaryMotor, Motor *secondaryMotor) { this->motorCount = 2; this->motors = new Motor *[2] { primaryMotor, secondaryMotor }; } void SynchronizedMotors::SetTargetSpeed(float speed) { for (unsigned char motorIx = 0; motorIx < this->motorCount; motorIx++) { this->motors[motorIx]->SetTargetSpeed(speed); } }