Skip to content
Snippets Groups Projects
README.md 1.51 KiB
Newer Older
# Quadcopter Section
bbartels's avatar
bbartels committed

This `quad/` directory contains all code that programs the quadcopter,
including any C libraries we have written, any HDL to program the Zybo on
bbartels's avatar
bbartels committed
the quad, and the XSDK main project that runs on the Zybo.

The main quad application is written as a library, and located at:
```
src/quad_app (main function in quad_app.c)
bbartels's avatar
bbartels committed
```

The main XSDK project that actually runs on the Zybo is located at:
```
xsdk_workspace/real_quad
bbartels's avatar
bbartels committed
```

If you were wondering, we do have the complementary virtual quad easy testing:
```
src/virt_quad
```
bbartels's avatar
bbartels committed

## Building our Libraries
bbartels's avatar
bbartels committed

To build the libraries:
```
make libs
```

You can also build each library individually inside their respective project
directories:
```
cd src/<project> && make
```

## Testing

We have split our code into 2 main sections: application code and hardware code.
We did that so that we can write tests that run automatically on CI. You just
can't run automatic tests on hardware code because the environments won't match.
bbartels's avatar
bbartels committed

All CI tests are run using the following target:
bbartels's avatar
bbartels committed
```
make test
```

This incorporates unit tests (`src/<library>/test`), as well as a few functional
test scripts (`scripts/tests`) that verify things on the virtual quad.

You can also run the tests for a specific library inside its respective project
bbartels's avatar
bbartels committed
directory:
```
cd src/<project> && make test
```

### XSDK Project

We have tests for the hardware-level code, they just have to be run manually.
You can find these tests along with instructions at
`xsdk_workspace/read_quad/src/hw_impl_zybo_tests.c`