Although I can't help with the Latte Panda, I can show you an easily readable snippet when the variable is ONLY 1 character via use of "switch case":
void loop() {
if (Serial.available() > 0) {
char val = Serial.read();
switch (val){
case 'S':
digitalWrite(Direction1,LOW); digitalWrite(Speed1, 0);
digitalWrite(Direction2,LOW); digitalWrite(Speed2, 0);
break;
case 'M':
int D1 = Serial.parseInt();
int S1 = Serial.parseInt();
int D2 = Serial.parseInt();
int S2 = Serial.parseInt();
break;
}
}
}