Modified qr_controller.c