update python example

This commit is contained in:
pdxlocations 2023-08-06 22:40:31 -07:00
parent 420de930ab
commit 0bbc398ba3

View file

@ -20,14 +20,14 @@ interface = meshtastic.serial_interface.SerialInterface()
interface.sendText("hello mesh")
ourNode = interface.getNode('^local')
print(f'Our node preferences:{ourNode.radioConfig.preferences}')
print(f'Our node preferences:{ourNode.localConfig.position.gps_update_interval}')
# update a value
print('Changing a preference...')
ourNode.radioConfig.preferences.gps_update_interval = 60
ourNode.localConfig.position.gps_update_interval = 60
print(f'Our node preferences now:{ourNode.radioConfig.preferences}')
ourNode.writeConfig()
print(f'Our node preferences now:{ourNode.localConfig.position.gps_update_interval}')
ourNode.writeConfig("position")
interface.close()
```