Skip to content

Commit fd08a11

Browse files
committed
Initialize driver on load
1 parent 6ddfe48 commit fd08a11

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

rev/rev.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
11
#include <semiwrap_init.rev._rev.hpp>
22

3-
SEMIWRAP_PYBIND11_MODULE(m) { initWrapper(m); }
3+
// rev doesn't expose the internal API, but you need to call these
4+
// to initialize the library otherwise it crashes
5+
extern "C" {
6+
void *getRevLibWpiDriver(void);
7+
void setREVLibDriver(void *newDriver);
8+
}
9+
10+
SEMIWRAP_PYBIND11_MODULE(m) {
11+
setREVLibDriver(getRevLibWpiDriver());
12+
13+
initWrapper(m);
14+
}

0 commit comments

Comments
 (0)