From 422c0145ccee6a1c541f3e5e5aad6d1df8aa65ef Mon Sep 17 00:00:00 2001
From: knmcguire <kimberly@bitcraze.io>
Date: Thu, 8 Aug 2019 10:01:43 +0200
Subject: [PATCH] #124 copied readme in seperate markdown files and added to
 menu

---
 docs/_data/menu.yml         |  6 +++++-
 docs/index.md               |  4 ++++
 docs/install_from_source.md | 37 +++++++++++++++++++++++++++++++++++++
 docs/testing.md             | 26 ++++++++++++++++++++++++++
 docs/usb_permissions.md     | 35 +++++++++++++++++++++++++++++++++++
 5 files changed, 107 insertions(+), 1 deletion(-)
 create mode 100644 docs/install_from_source.md
 create mode 100644 docs/testing.md
 create mode 100644 docs/usb_permissions.md

diff --git a/docs/_data/menu.yml b/docs/_data/menu.yml
index 7484c35..d4498c1 100644
--- a/docs/_data/menu.yml
+++ b/docs/_data/menu.yml
@@ -1,7 +1,11 @@
 - page_id: home
 - title: Install Instructions
   subs:
-    - {page_id: dummy}
+    - {page_id: install_from_source}
+    - {page_id: usd_permissions}
+- title: Development
+  subs:
+    - {page_id: testing}
 
 
 
diff --git a/docs/index.md b/docs/index.md
index e7a5eb4..ddedfba 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -7,4 +7,8 @@ cflib is an API written in Python that is used to communicate with the Crazyflie
 and Crazyflie 2.0 quadcopters. It is intended to be used by client software to
 communicate with and control a Crazyflie quadcopter. For instance the [Crazyflie PC client](https://github.com/bitcraze/crazyflie-clients-python)  uses the cflib.
 
+## Contribute
+
+Everyone is encouraged to contribute to the CrazyFlie library by forking the Github repository and making a pull request or opening an issue.
+
 
diff --git a/docs/install_from_source.md b/docs/install_from_source.md
new file mode 100644
index 0000000..8c3cacf
--- /dev/null
+++ b/docs/install_from_source.md
@@ -0,0 +1,37 @@
+---
+title: Installing from source
+page_id: install_from_source 
+---
+### Developing for the cfclient
+* [Fork the cflib](https://help.github.com/articles/fork-a-repo/)
+* [Clone the cflib](https://help.github.com/articles/cloning-a-repository/), `git clone git@github.com:YOUR-USERNAME/crazyflie-lib-python.git`
+* [Install the cflib in editable mode](http://pip-python3.readthedocs.org/en/latest/reference/pip_install.html?highlight=editable#editable-installs), `pip install -e path/to/cflib` 
+
+
+* [Uninstall the cflib if you don't want it any more](http://pip-python3.readthedocs.org/en/latest/reference/pip_uninstall.html), `pip uninstall cflib`
+
+Note: If you are developing for the [cfclient][cfclient] you must use python3. On Ubuntu (16.04, 18.08) use `pip3` instead of `pip`.
+
+### Linux, OSX, Windows
+
+The following should be executed in the root of the crazyflie-lib-python file tree.
+
+#### Virtualenv
+This section contains a very short description of how to use [virtualenv (local python environment)](https://virtualenv.pypa.io/en/latest/) 
+with package dependencies. If you don't want to use virualenv and don't mind installing cflib dependencies system-wide
+you can skip this section.
+
+* Install virtualenv: `pip install virtualenv`
+* create an environment: `virtualenv venv`
+* Activate the environment: `source venv/bin/activate`
+
+
+* To deactivate the virtualenv when you are done using it `deactivate`
+
+Note: For systems that support [make](https://www.gnu.org/software/make/manual/html_node/Simple-Makefile.html), you can use `make venv` to
+create an environment, activate it and install dependencies.
+
+#### Install cflib dependencies
+Install dependencies required by the lib: `pip install -r requirements.txt`
+
+To verify the installation, connect the crazyflie and run an example: `python examples/basiclog`
diff --git a/docs/testing.md b/docs/testing.md
new file mode 100644
index 0000000..cd05d12
--- /dev/null
+++ b/docs/testing.md
@@ -0,0 +1,26 @@
+---
+title: Testing
+page_id: testing
+---
+
+## Testing
+### With docker and the toolbelt
+
+For information and installation of the 
+[toolbelt.](https://wiki.bitcraze.io/projects:dockerbuilderimage:index)
+  
+* Check to see if you pass tests: `tb test`
+* Check to see if you pass style guidelines: `tb verify`
+
+Note: Docker and the toolbelt is an optional way of running tests and reduces the 
+work needed to maintain your python environmet. 
+
+### Native python on Linux, OSX, Windows
+ [Tox](http://tox.readthedocs.org/en/latest/) is used for native testing: `pip install tox`
+* If test fails after installing tox with `pip install tox`, installing with  `sudo apt-get install tox`result a successful test run
+
+* Test package in python2.7 `TOXENV=py27 tox`
+* Test package in python3.4 `TOXENV=py34 tox`
+* Test package in python3.6 `TOXENV=py36 tox`
+
+Note: You must have the specific python versions on your machine or tests will fail. (ie. without specifying the TOXENV, `tox` runs tests for python2.7, 3.3, 3.4 and would require all python versions to be installed on the machine.)
diff --git a/docs/usb_permissions.md b/docs/usb_permissions.md
new file mode 100644
index 0000000..e88959e
--- /dev/null
+++ b/docs/usb_permissions.md
@@ -0,0 +1,35 @@
+---
+title: USB permissions
+page_id: usd_permissions
+---
+
+### Linux
+
+The following steps make it possible to use the USB Radio without being root.
+
+```
+sudo groupadd plugdev
+sudo usermod -a -G plugdev $USER
+```
+
+You will need to log out and log in again in order to be a member of the plugdev group.
+
+Create a file named ```/etc/udev/rules.d/99-crazyradio.rules``` and add the
+following:
+```
+# Crazyradio (normal operation)
+SUBSYSTEM=="usb", ATTRS{idVendor}=="1915", ATTRS{idProduct}=="7777", MODE="0664", GROUP="plugdev"
+# Bootloader
+SUBSYSTEM=="usb", ATTRS{idVendor}=="1915", ATTRS{idProduct}=="0101", MODE="0664", GROUP="plugdev"
+```
+
+To connect Crazyflie 2.0 via usb, create a file name ```/etc/udev/rules.d/99-crazyflie.rules``` and add the following:
+```
+SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", MODE="0664", GROUP="plugdev"
+```
+
+You can reload the udev-rules using the following:
+```
+sudo udevadm control --reload-rules
+sudo udevadm trigger
+```
-- 
GitLab