pigeon init add max retry count

old-commit-hash: f7e276fcce
vw-mqb-aeb
Willem Melching 4 years ago
parent ba9cc9b067
commit 548722a954
  1. 9
      selfdrive/boardd/pigeon.cc

@ -64,7 +64,8 @@ bool Pigeon::send_with_ack(std::string cmd){
}
void Pigeon::init() {
while (!do_exit){
for (int i = 0; i < 10; i++){
if (do_exit) return;
LOGW("panda GPS start");
// power off pigeon
@ -106,10 +107,10 @@ void Pigeon::init() {
if (!send_with_ack("\xB5\x62\x06\x01\x03\x00\x0A\x09\x01\x1E\x70"s)) continue;
if (!send_with_ack("\xB5\x62\x06\x01\x03\x00\x0A\x0B\x01\x20\x74"s)) continue;
break;
LOGW("panda GPS on");
return;
}
LOGW("panda GPS on");
LOGE("failed to initialize panda GPS");
}
void PandaPigeon::connect(Panda * p) {

Loading…
Cancel
Save