#define POLL_PERIOD 20
serial = Runtime.start("serial","Serial")

COMPORT= "COM19"
BAUDRATE = 9600
#define MSP_SET_RAW_RC        200
#define MSP_SET_RAW_RC_LENGTH 16

RC_MIN = 1000
RC_MID = 1500
RC_MAX = 2000

ROLL     =  0
PITCH    =  1
YAW      =  2
THROTTLE =  3
AUX1     =  4
AUX2     =  5
AUX3     =  6
AUX4     =  7

#RC signals to send to the quad
#format: { roll, throttle, yaw, pitch, 0, 0, 0, 0 }
uint16_t rc_signals[8] = { 1234 }; 

#Buffer for storing the serializes byte form of the RC signals
uint8_t rc_bytes[16] = { 0 };

serial.connect(COMPORT,BAUDRATE,8,1,0);

send_msp(MSP_SET_RAW_RC, rc_bytes, MSP_SET_RAW_RC_LENGTH);

def arm():

  rc_signals[THROTTLE] = RC_MIN;
  rc_signals[YAW] = RC_MAX;
  rc_signals[PITCH] = RC_MID;
  rc_signals[ROLL] = RC_MID;
  rc_signals[AUX1] = RC_MIN;
  rc_signals[AUX2] = RC_MIN;
  
arm()

@@ -643,18 +643,335 @@
  arm():%0A
-%0A
  
+ serial.write(Header0??)%0A  serial.write(Header1??)%0A  serial.write(Header2??)%0A  serial.write(MsgType??)%0A  serial.write(MsgLength??)%0A  %0A  serial.write(throttleValue)%0A  serial.write(yawValue)%0A  serial.write(pitchValue)%0A  serial.write(rollValue)%0A  serial.write(aux1)%0A  serial.write(aux2)%0A  %0A  serial.write(checksum)%0A  %0A  #
  rc_sign
@@ -987,32 +987,34 @@
 TLE%5D = RC_MIN;%0A 
+ #
  rc_signals%5BYAW%5D
@@ -1025,16 +1025,18 @@
 C_MAX;%0A 
+ #
  rc_sign
@@ -1049,32 +1049,34 @@
 TCH%5D = RC_MID;%0A 
+ #
  rc_signals%5BROLL
@@ -1088,16 +1088,18 @@
 C_MID;%0A 
+ #
  rc_sign
@@ -1119,16 +1119,18 @@
 C_MIN;%0A 
+ #
  rc_sign

Update Multiwii.py