Added state machine for car control and motor speed calculations for remote control mode