Closed auscompgeek closed 9 months ago
From the build log:
build/temp.linux-x86_64-cpython-311/gensrc/wpilib_core/AddressableLED.cpp:62:60: error: ‘HAL_AddressableLEDData’ is not a member of ‘frc’; did you mean ‘AddressableLED’?
62 | py::class_<typename frc::AddressableLED::LEDData, frc::HAL_AddressableLEDData> cls_LEDData;
| ^~~~~~~~~~~~~~~~~~~~~~
| AddressableLED
I don't understand why robotpy-build is prefixing the base type with the frc::
namespace.
It's doing it because there's no namespace specified for the base, and the child lives in a namespace, so the odds are that the base is going to be in the same namespace.
wpilib.AddressableLED.LEDData.setRGB
is documented as:But how do you set the individual values of the LED? In C++ you'd be able to set the
r
,g
, andb
members. However our bindings currently don't allow that, because we hide the fact thatLEDData
subclasses thehal.AddressableLEDData
struct.This makes those member variables visible via the base
hal.AddressableLEDData
.