Fix rt_serial_control() bug for customized command and indent the code