-
Notifications
You must be signed in to change notification settings - Fork 49
saveNetwork and saveRegisters returns None #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
With the current master a9cad47 While calling saveNetwork. The same saveRegisters Nonetype is now crashing the command.
|
Solved by replacing: def saveRegisters(self, registers, remote_id=None):
"""
Saves the given registers to the Pozyx's flash memory, if these are writable registers.
This means that upon reset, the Pozyx will use these saved values instead of the default values.
This is especially practical when changing UWB settings of an entire network, making it unnecessary
to re - set these when resetting or repowering a device.
DISCLAIMER: Make sure to not abuse this function in your code, as the flash memory only has a finite
number of writecycles available, adhere to the Arduino's mentality in using flash memory.
Args:
registers: Registers to save to the flash memory. Data([register1, register2, ...]) or [register1, register2, ...]
These registers have to be writable. Saving the UWB gain is currently not working.
Kwargs:
remote_id: Remote Pozyx ID.
Returns:
POZYX_SUCCESS, POZYX_FAILURE, POZYX_TIMEOUT
"""
self.saveConfiguration(
POZYX_FLASH_REGS, registers, remote_id) by: def saveRegisters(self, registers, remote_id=None):
"""
Saves the given registers to the Pozyx's flash memory, if these are writable registers.
This means that upon reset, the Pozyx will use these saved values instead of the default values.
This is especially practical when changing UWB settings of an entire network, making it unnecessary
to re - set these when resetting or repowering a device.
DISCLAIMER: Make sure to not abuse this function in your code, as the flash memory only has a finite
number of writecycles available, adhere to the Arduino's mentality in using flash memory.
Args:
registers: Registers to save to the flash memory. Data([register1, register2, ...]) or [register1, register2, ...]
These registers have to be writable. Saving the UWB gain is currently not working.
Kwargs:
remote_id: Remote Pozyx ID.
Returns:
POZYX_SUCCESS, POZYX_FAILURE, POZYX_TIMEOUT
"""
return self.saveConfiguration(
POZYX_FLASH_REGS, registers, remote_id) |
Hey Alexis, Sorry for the long wait! I'm working with the Python library this week so I'll be catching up on maintenance and put a new version on PyPi |
Fixed in develop, will merge into master and release after testing |
Thanks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dear,
The functions local_device.saveNetwork and local_deviceRegisters are returning None instead of the POZYX_SUCCESS or POZYX_FAILURE.
The text was updated successfully, but these errors were encountered: