Serial Communication Problem in Quadcopter Project

Hello,
I have some problem about wireless communication on my quadcopter project.I'm using Dorji RF Transceiver modules for this project.Here's datasheet;

http://www.dorji.com/docs/data/DRF7020D13.pdf

But,when quadcopter and remote control sides start to work , i'm taking unwanted datas in quadcopter side.How can i prevent these unwanted datas that i didn't send ???

I added Serial Port Screen of the quadcopter side about this problem,

and added Remote control Board Code and Quadcopter Receiving Part Code

Remote Control Board:

int x[3];
char cond[3]={'A','B','C''};

void setup() {
pinMode(A0,INPUT);
pinMode(A1,INPUT);
pinMode(A2,INPUT);
Serial.begin(9600);
}

void loop() {
x[0]=analogRead(A0);
x[1]=analogRead(A1);
x[2]=analogRead(A2);

x[0]=map(x[0],0,1023,0,255);
x[1]=map(x[1],0,1023,0,255);
x[2]=map(x[2],0,1023,0,255);

for(int i=0;i<3;i++){
Serial.write(cond*);*
_ Serial.write(x*);_
_
}_
_
delay(10);_
_
}_
Receiving Part Code:
void UpdateSetPoints() {
if(Serial.available()){
_
if(Serial.read()=='A'){_
_
baseSpeed=Serial.read();_
_
baseSpeed=map(baseSpeed,0,255,970,1970);_
_
delayMicroseconds(10);_
_
}_
_
if(Serial.read()=='B'){_
_
setPointRoll=Serial.read();_
_
setPointRoll=map(setPointRoll,0,255,-30,30);_
_
delayMicroseconds(10);_
_
}_
_
if(Serial.read()=='C'){_
_
setPointPitch=Serial.read();_
_
setPointPitch=map(setPointPitch,0,255,-30,30);_
_
delayMicroseconds(10);_
_
}_
_
}}_
_

*_

f(Serial.available()){
    if(Serial.read()=='A'){
      baseSpeed=Serial.read();
      baseSpeed=map(baseSpeed,0,255,970,1970);
      delayMicroseconds(10);
       }
     if(Serial.read()=='B'){
       setPointRoll=Serial.read();
       setPointRoll=map(setPointRoll,0,255,-30,30);
       delayMicroseconds(10);
     }
     if(Serial.read()=='C'){
       setPointPitch=Serial.read();
       setPointPitch=map(setPointPitch,0,255,-30,30);
       delayMicroseconds(10);
     }

Crap. Complete crap.

If there is one byte available to read, it is NOT OK to read up to 4 bytes.

Suppose that the character that you read was a 'B'. If is not an 'A', so you read another character. Does that make ANY sense?

So what can i do to take all my analog values securely ??

So what can i do to take all my analog values securely ??

The first thing that you need to do is store the character that you read, and then test that against the possible values.

The second thing that you need to do is wait for another character to arrive before reading.

The third thing you need to do is put every { on a new line, where they belong.

   if(Serial.available() > 0)
   {
      char funType = Serial.read();
      switch(funType)
      {
         case 'A':
            while(Serial.available() == 0)
            {
               // do nothing
            }
            baseSpeed=Serial.read();
            baseSpeed=map(baseSpeed,0,255,970,1970);
            delayMicroseconds(10);
            break;

         // The rest of the cases go here
      }
   }

Ok.Thanks for the advices.It is working now.I've understood why it didn't work more clearly...