I would like to read Wifi_rssi each time that it changes. I´m using the command in my while function movement control drone.get_state(rssi_changed)
to track it each time that rssi change, but this error happens and i dont know how to solve it.
@Jerome
from olympe.messages.wifi import rssi_changed
def Wifi_rssi(self, valor):
if valor != self.nuevo_valor_rssi:
print("Signal quality",valor["rssi"])
self.nuevo_valor_rssi = valor["rssi"]
...
while (True):
logs.Wifi_rssi(drone.get_state(rssi_changed))
And this is the error I receive:
File "/home/robotica/code/parrot-groundsdk/out/olympe-linux/final/usr/lib/python/site-packages/olympe/arsdkng/drone.py", line 1195, in get_state
return self._get_message(message.id).state()
File "/home/robotica/code/parrot-groundsdk/out/olympe-linux/final/usr/lib/python/site-packages/olympe/arsdkng/messages.py", line 1024, in state
raise RuntimeError("{} state is uninitialized".format(self.fullName))
RuntimeError: wifi.rssi_changed state is uninitialized