Skip to content

Commit

Permalink
Revert "boardd: new class USBDevice (commaai#23015)"
Browse files Browse the repository at this point in the history
This reverts commit 4061f50.
  • Loading branch information
briskspirit committed Dec 17, 2021
1 parent 4061f50 commit 285adde
Show file tree
Hide file tree
Showing 10 changed files with 300 additions and 235 deletions.
2 changes: 0 additions & 2 deletions release/files_common
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ selfdrive/boardd/boardd_api_impl.pyx
selfdrive/boardd/can_list_to_can_capnp.cc
selfdrive/boardd/panda.cc
selfdrive/boardd/panda.h
selfdrive/boardd/usbdevice.cc
selfdrive/boardd/usbdevice.h
selfdrive/boardd/pigeon.cc
selfdrive/boardd/pigeon.h
selfdrive/boardd/set_time.py
Expand Down
4 changes: 2 additions & 2 deletions selfdrive/boardd/SConscript
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Import('env', 'envCython', 'common', 'cereal', 'messaging')

libs = ['usb-1.0', common, cereal, messaging, 'pthread', 'zmq', 'capnp', 'kj']
env.Program('boardd', ['boardd.cc', 'panda.cc', 'usbdevice.cc', 'pigeon.cc'], LIBS=libs)
env.Program('boardd', ['boardd.cc', 'panda.cc', 'pigeon.cc'], LIBS=libs)
env.Library('libcan_list_to_can_capnp', ['can_list_to_can_capnp.cc'])

envCython.Program('boardd_api_impl.so', 'boardd_api_impl.pyx', LIBS=["can_list_to_can_capnp", 'capnp', 'kj'] + envCython["LIBS"])
if GetOption('test'):
env.Program('tests/test_boardd_usbprotocol', ['tests/test_boardd_usbprotocol.cc', 'panda.cc', 'usbdevice.cc'], LIBS=libs)
env.Program('tests/test_boardd_usbprotocol', ['tests/test_boardd_usbprotocol.cc', 'panda.cc'], LIBS=libs)
2 changes: 1 addition & 1 deletion selfdrive/boardd/boardd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ bool safety_setter_thread(std::vector<Panda *> pandas) {
Panda *usb_connect(std::string serial="", uint32_t index=0) {
std::unique_ptr<Panda> panda;
try {
panda = std::make_unique<Panda>(serial, (index * BUS_CNT));
panda = std::make_unique<Panda>(serial, (index * PANDA_BUS_CNT));
} catch (std::exception &e) {
return nullptr;
}
Expand Down
Loading

0 comments on commit 285adde

Please sign in to comment.