Confirm char over softSerial
This commit is contained in:
parent
751da7728b
commit
0c01eeb36e
|
@ -122,11 +122,11 @@ void cmd (char which, int source) {
|
|||
} else if (which == Bcmd && !Brunning) {
|
||||
backward(source);
|
||||
} else if (which == cmd_debug) {
|
||||
debug();
|
||||
debug(source);
|
||||
} else if (which == cmd_connect) {
|
||||
connect();
|
||||
connect(source);
|
||||
} else if (which == cmd_mcopy_identifier) {
|
||||
identify();
|
||||
identify(source);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -312,19 +312,31 @@ void btnCmd (int index, int time) {
|
|||
}
|
||||
}
|
||||
|
||||
void connect () {
|
||||
Serial.println(cmd_connect);
|
||||
void connect (int source) {
|
||||
if (source == 0) {
|
||||
Serial.println(cmd_connect);
|
||||
} else if (source == 1) {
|
||||
softSerial.write(cmd_connect);
|
||||
}
|
||||
log("connect()");
|
||||
}
|
||||
|
||||
void identify () {
|
||||
Serial.println(cmd_takeup_identifier);
|
||||
void identify (int source) {
|
||||
if (source == 0) {
|
||||
Serial.println(cmd_takeup_identifier);
|
||||
} else if (source == 1) {
|
||||
softSerial.write(cmd_takeup_identifier);
|
||||
}
|
||||
log("identify()");
|
||||
}
|
||||
|
||||
void debug () {
|
||||
void debug (int source) {
|
||||
debug_state = true;
|
||||
Serial.println(cmd_debug);
|
||||
if (source == 0) {
|
||||
Serial.println(cmd_debug);
|
||||
} else if (source == 1) {
|
||||
softSerial.write(cmd_debug);
|
||||
}
|
||||
log("debugging enabled");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue