Bridge class now checks for protocol version
This commit is contained in:
parent
78c0038596
commit
01d7c06121
|
@ -27,8 +27,6 @@ void BridgeClass::begin() {
|
||||||
return;
|
return;
|
||||||
started = true;
|
started = true;
|
||||||
|
|
||||||
// TODO: A more robust restart
|
|
||||||
|
|
||||||
// Wait for Atheros bootloader to finish startup
|
// Wait for Atheros bootloader to finish startup
|
||||||
do {
|
do {
|
||||||
dropAll();
|
dropAll();
|
||||||
|
@ -53,8 +51,11 @@ void BridgeClass::begin() {
|
||||||
// are ignored as "invalid packets".
|
// are ignored as "invalid packets".
|
||||||
|
|
||||||
// Reset the brigde
|
// Reset the brigde
|
||||||
uint8_t cmd[] = {'X','X'};
|
uint8_t cmd[] = {'X','X', '1','0','0'};
|
||||||
transfer(cmd, 2);
|
uint8_t res[1];
|
||||||
|
transfer(cmd, 5, res, 1);
|
||||||
|
if (res[0] != 0)
|
||||||
|
while (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t BridgeClass::runCommand(String &command, uint8_t &err) {
|
uint8_t BridgeClass::runCommand(String &command, uint8_t &err) {
|
||||||
|
|
Loading…
Reference in New Issue