|
|
@ -13,9 +13,11 @@ Panda::Panda(std::string serial, uint32_t bus_offset) : bus_offset(bus_offset) { |
|
|
|
// try USB first, then SPI
|
|
|
|
// try USB first, then SPI
|
|
|
|
try { |
|
|
|
try { |
|
|
|
handle = std::make_unique<PandaUsbHandle>(serial); |
|
|
|
handle = std::make_unique<PandaUsbHandle>(serial); |
|
|
|
|
|
|
|
LOGW("conntected to %s over USB", serial.c_str()); |
|
|
|
} catch (std::exception &e) { |
|
|
|
} catch (std::exception &e) { |
|
|
|
#ifndef __APPLE__ |
|
|
|
#ifndef __APPLE__ |
|
|
|
handle = std::make_unique<PandaSpiHandle>(serial); |
|
|
|
handle = std::make_unique<PandaSpiHandle>(serial); |
|
|
|
|
|
|
|
LOGW("conntected to %s over SPI", serial.c_str()); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|