ekwilinski / Framework

Framework to interface the High Level Control Algorithm (HLCA) with the physical drone via MavLink.
1 stars 0 forks source link

Only certain telemetry systems are retrieved from _drone #3

Closed justincdavis closed 2 years ago

justincdavis commented 2 years ago

Currently, only a certain number of telemetry systems are retrieved from the underlying mavsdk.System instance. A more robust system which automatically identifies and schedules these telemetry updates is necessary.

A possible solution is to utilize the dir() function to poll _drone.telemetry and access the telemetry systems. Then these can be parsed and used as keys in a dictionary to form all the tasks returned by asyncio.ensure_future and to store the data packet.

self._telemetry_tasks = {} self._telemetry_data = {}

Then the data can be accessed: def telemetry_gps_info(self): return self._telemetry_data["gps_info"]

This would greatly reduce the lines of code needed. Then to close the futures the same method currently being used can stay.

justincdavis commented 2 years ago

Full telemetry implemented in Telemetry class. Switched calls to use 'telemetry.' Vs. 'telemetry_'