Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

Feature/reorganize #19

Merged
merged 19 commits into from Feb 7, 2019
Merged

Feature/reorganize #19

merged 19 commits into from Feb 7, 2019

Conversation

Thomas-McKanna
Copy link
Contributor

This is the reorganize of the flight code according to Clay's diagram. During the process of reorganizing, I changed certain aspects of the flight code. Of note:

  • The Instruction class has been rolled into the Task class (the old instructions class's sole purpose was to decode messages sent over the network into tasks, so the name Instruction was misleading)
  • The Drone class now sub-classes dronekit.Vehicle (rather that containing a variable that was a dronekit.Vehicle). This simplified things. For example, the old code would have had to do drone._vehicle.rangerfinder.distance and new code can do drone.rangefinder.distance.
  • The Drone class is now purely an interface to the drone. It does not calculate pid values or sleep the program. These sorts of thing were better suited for DroneController, which is where they now reside. This change will allow Tasks to be much more dynamic, but has required all Tasks to be rewritten.
  • Added a task for takeoff, land, and hover (of note: movement not yet implemented, but this won't be hard)

This is a big one, but I'm hoping we can get done by the flight test this weekend.

Copy link

@christopher-o-toole christopher-o-toole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally you should document each file with a docstring but I'll let it slide for now given our schedule. The documentation and use of constants was a bit inconsistent in some areas as well. Other than that, the majority of the code looked alright.

flight/drone/drone.py Outdated Show resolved Hide resolved
flight/drone/drone.py Outdated Show resolved Hide resolved
flight/drone/drone.py Outdated Show resolved Hide resolved
flight/drone/drone.py Outdated Show resolved Hide resolved
flight/drone/drone.py Outdated Show resolved Hide resolved
flight/tasks/hover_task.py Outdated Show resolved Hide resolved
flight/tasks/land_task.py Outdated Show resolved Hide resolved
test_scripts/test_hover.py Outdated Show resolved Hide resolved
unit_tests/simple_imports.py Show resolved Hide resolved
flight/tasks/task_base.py Show resolved Hide resolved
@Thomas-McKanna
Copy link
Contributor Author

Chris, I will add docstrings for each file to the Trello todo list.

Copy link
Member

@ClayMav ClayMav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • test_scripts should not exist, and its contents should be in unit_tests.
  • There should be no need for an __init__.py in the root directory.
  • There are no configuration parameters in the flightconfig.py, I would figure at least a few things should be configurable from flight to flight.
    I don't think theres anything I really want to nitpick in the code here.

@MissouriMRR MissouriMRR deleted a comment Feb 6, 2019
@MissouriMRR MissouriMRR deleted a comment Feb 6, 2019
@MissouriMRR MissouriMRR deleted a comment Feb 6, 2019
@MissouriMRR MissouriMRR deleted a comment from Thomas-McKanna Feb 6, 2019
@MissouriMRR MissouriMRR deleted a comment Feb 6, 2019
@MissouriMRR MissouriMRR deleted a comment Feb 6, 2019
@MissouriMRR MissouriMRR deleted a comment Feb 6, 2019
@MissouriMRR MissouriMRR deleted a comment Feb 6, 2019
@MissouriMRR MissouriMRR deleted a comment Feb 6, 2019
@MissouriMRR MissouriMRR deleted a comment Feb 7, 2019
@MissouriMRR MissouriMRR deleted a comment Feb 7, 2019
@MissouriMRR MissouriMRR deleted a comment Feb 7, 2019
@MissouriMRR MissouriMRR deleted a comment Feb 7, 2019
@MissouriMRR MissouriMRR deleted a comment Feb 7, 2019
@MissouriMRR MissouriMRR deleted a comment Feb 7, 2019
@MissouriMRR MissouriMRR deleted a comment Feb 7, 2019
@MissouriMRR MissouriMRR deleted a comment Feb 7, 2019
@MissouriMRR MissouriMRR deleted a comment Feb 7, 2019
@MissouriMRR MissouriMRR deleted a comment Feb 7, 2019
@Thomas-McKanna Thomas-McKanna merged commit 86fd8fc into develop Feb 7, 2019
@christopher-o-toole christopher-o-toole deleted the feature/reorganize branch February 9, 2019 03:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants