Control a serial port. This can be used for raw access to an onboard
                serial peripheral such as a GPS or telemetry radio. It
                is designed to make it possible to update the devices
                firmware via MAVLink messages or change the devices
                settings. A message with zero bytes can be used to
                change just the baudrate.

                device                    : See SERIAL_CONTROL_DEV enum (uint8_t)
                flags                     : See SERIAL_CONTROL_FLAG enum (uint8_t)
                timeout                   : Timeout for reply data in milliseconds (uint16_t)
                baudrate                  : Baudrate of transfer. Zero means no change. (uint32_t)
                count                     : how many bytes in this transfer (uint8_t)
                data                      : serial data (uint8_t)

def serial_control_send(self, device, flags, timeout, baudrate, count, data, force_mavlink1=False):
                '''
                Control a serial port. This can be used for raw access to an onboard
                serial peripheral such as a GPS or telemetry radio. It
                is designed to make it possible to update the devices
                firmware via MAVLink messages or change the devices
                settings. A message with zero bytes can be used to
                change just the baudrate.

                device                    : See SERIAL_CONTROL_DEV enum (uint8_t)
                flags                     : See SERIAL_CONTROL_FLAG enum (uint8_t)
                timeout                   : Timeout for reply data in milliseconds (uint16_t)
                baudrate                  : Baudrate of transfer. Zero means no change. (uint32_t)
                count                     : how many bytes in this transfer (uint8_t)
                data                      : serial data (uint8_t)

                '''
                return self.send(self.serial_control_encode(device, flags, timeout, baudrate, count, data), force_mavlink1=force_mavlink1)