Closed arslogavitabrevis closed 1 year ago
I've double check the code and everything work as expected. The first argument of the _setAttr method is the attribute of the device name to update, not the python variable.
When you call set_volume, the library does not update the _volume variable. It' send the command to the module and invalidate the cache. Then, when you call get_volume, the value is loaded directly from the module.
I run into some issues with the volume not updated and even being 0 after having called the function set_volume from the yoctopuce_buzzer.
After some tinkering, I realised that the "volume" attribute did not exist but the "_volume" did exist. After changing the string parameter for the attribute name it did work.
This may also be linked to how the _setAttr method work.