diff --git a/drone/control/__init__.py b/drone/control/__init__.py deleted file mode 100644 index f8fc9ca..0000000 --- a/drone/control/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__all__ = ['FlightLib', 'LedLib'] diff --git a/drone/control/flight.py b/drone/modules/flight.py similarity index 99% rename from drone/control/flight.py rename to drone/modules/flight.py index 6ecb302..6a40e97 100644 --- a/drone/control/flight.py +++ b/drone/modules/flight.py @@ -29,7 +29,7 @@ arming = rospy.ServiceProxy('/mavros/cmd/arming', CommandBool) landing = rospy.ServiceProxy('/land', Trigger) emergency_land = rospy.ServiceProxy('/emergency_land', Trigger) -services_list = ['/navigate', '/set_position', '/set_rates', '/mavros/set_mode', +services_list = ['/navigate', '/set_position', '/set_rates', '/mavros/set_mode', '/get_telemetry', '/mavros/cmd/arming', '/land', '/mavros/param/get'] logger.info("Proxy services inited") diff --git a/drone/control/led.py b/drone/modules/led.py similarity index 95% rename from drone/control/led.py rename to drone/modules/led.py index 21e6cbc..a3e4b3b 100644 --- a/drone/control/led.py +++ b/drone/modules/led.py @@ -205,7 +205,7 @@ def strip_off(): def led_thread(): global mode - logger.info("Starting LedLib thread") + logger.info("Starting led control thread") iteration = 0 while True: if mode == "rainbow": @@ -242,7 +242,7 @@ def led_thread(): # init -def init_led(led_pin = LED_PIN): +def init(led_pin = LED_PIN): global strip strip = Adafruit_NeoPixel(LED_COUNT, led_pin, LED_FREQ_HZ, LED_DMA, LED_INVERT, LED_BRIGHTNESS, LED_CHANNEL) strip.begin() @@ -252,7 +252,7 @@ def init_led(led_pin = LED_PIN): if __name__ == '__main__': - init_led() + init() try: rainbow() except KeyboardInterrupt: