Error with wifi_rssi

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.

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):

And this is the error I receive:

  File "/home/robotica/code/parrot-groundsdk/out/olympe-linux/final/usr/lib/python/site-packages/olympe/arsdkng/", line 1195, in get_state
    return self._get_message(
  File "/home/robotica/code/parrot-groundsdk/out/olympe-linux/final/usr/lib/python/site-packages/olympe/arsdkng/", line 1024, in state
    raise RuntimeError("{} state is uninitialized".format(self.fullName))
RuntimeError: wifi.rssi_changed state is uninitialized

This topic was automatically closed after 30 days. New replies are no longer allowed.