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) {
|
} else if (which == Bcmd && !Brunning) {
|
||||||
backward(source);
|
backward(source);
|
||||||
} else if (which == cmd_debug) {
|
} else if (which == cmd_debug) {
|
||||||
debug();
|
debug(source);
|
||||||
} else if (which == cmd_connect) {
|
} else if (which == cmd_connect) {
|
||||||
connect();
|
connect(source);
|
||||||
} else if (which == cmd_mcopy_identifier) {
|
} else if (which == cmd_mcopy_identifier) {
|
||||||
identify();
|
identify(source);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -312,19 +312,31 @@ void btnCmd (int index, int time) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void connect () {
|
void connect (int source) {
|
||||||
|
if (source == 0) {
|
||||||
Serial.println(cmd_connect);
|
Serial.println(cmd_connect);
|
||||||
|
} else if (source == 1) {
|
||||||
|
softSerial.write(cmd_connect);
|
||||||
|
}
|
||||||
log("connect()");
|
log("connect()");
|
||||||
}
|
}
|
||||||
|
|
||||||
void identify () {
|
void identify (int source) {
|
||||||
|
if (source == 0) {
|
||||||
Serial.println(cmd_takeup_identifier);
|
Serial.println(cmd_takeup_identifier);
|
||||||
|
} else if (source == 1) {
|
||||||
|
softSerial.write(cmd_takeup_identifier);
|
||||||
|
}
|
||||||
log("identify()");
|
log("identify()");
|
||||||
}
|
}
|
||||||
|
|
||||||
void debug () {
|
void debug (int source) {
|
||||||
debug_state = true;
|
debug_state = true;
|
||||||
|
if (source == 0) {
|
||||||
Serial.println(cmd_debug);
|
Serial.println(cmd_debug);
|
||||||
|
} else if (source == 1) {
|
||||||
|
softSerial.write(cmd_debug);
|
||||||
|
}
|
||||||
log("debugging enabled");
|
log("debugging enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue