Closed cttdev closed 1 year ago
Hm, we fixed that keyword argument in #16.
It's quite possible the callback arguments still need to be fixed, but I didn't think pybind11 does that level of introspection.
I ran locally on 2020.3.2.2 earlier and while it got past that line, it errored on:
➜ ctt python le.py 127.0.0.1
Traceback (most recent call last):
File "le.py", line 40, in <module>
sd.addEntryListener(valueChanged)
TypeError: addEntryListener(): incompatible function arguments. The following argument types are supported:
1. (self: _pyntcore._ntcore.NetworkTable, listener: Callable[[_pyntcore._ntcore.NetworkTable, str, _pyntcore._ntcore.NetworkTableEntry, _pyntcore._ntcore.Value, int], None], flags: int) -> int
2. (self: _pyntcore._ntcore.NetworkTable, key: str, listener: Callable[[_pyntcore._ntcore.NetworkTable, str, _pyntcore._ntcore.NetworkTableEntry, _pyntcore._ntcore.Value, int], None], flags: int) -> int
Invoked with: <_pyntcore._ntcore.NetworkTable object at 0x10e4a7470>, <function valueChanged at 0x10e9b4040>
It appears that pyntcore addEntryListener requires flags
to be passed in while pynetworktables does not.
Right, it looks like we need to copy the NetworkTablesInstance addEntryListener code to NetworkTable then.
The Listener example in the pynetworktables docs throw the following error when complied with pyntcore: