forked from vjaunet/QUADCOPTER
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Comments in almost each file of the project for more
clarity
- Loading branch information
Showing
12 changed files
with
102 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,9 @@ | |
|
||
#include <string.h> | ||
#include <string> | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
|
||
|
||
class CLI { | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
/* | ||
DMP class | ||
author : vincent jaunet | ||
date : 10-01-2013 | ||
Description : | ||
The DMP class is mainly a wrapper to the MPU6050 | ||
one from github/PiBits and Jeff Rowberg <[email protected]> | ||
It defines the main functions to : | ||
-set up the I2C communication through I2Cdev | ||
-Initialize the measurements and retrieve Offset values | ||
-Get the attitude of the drone | ||
*/ | ||
|
||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <unistd.h> | ||
|
@@ -80,6 +97,10 @@ void DMP::set_com() { | |
} | ||
|
||
void DMP::initialize(){ | ||
|
||
//This routine waits for the yaw angle to stop | ||
//drifting | ||
|
||
if (!dmpReady) return; | ||
|
||
printf("Initializing IMU...\n"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,16 @@ | |
PID Controller | ||
author : vincent JAUNET | ||
mail : [email protected] | ||
mail : [email protected] | ||
date : 10-01-2013 | ||
Description: | ||
the PID class is a collection of routine necessary | ||
to perform a PID control based on setpoints (remote control), | ||
inputs (measured attitude). | ||
Can be used for any type of system and features : | ||
- Derivative on measurement | ||
- Windsup of integral errors | ||
*/ | ||
|
||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,26 @@ | ||
#include <iostream> | ||
#include <stdlib.h> | ||
#include <fstream> | ||
/* | ||
Servo Class | ||
author : vincent JAUNET | ||
mail : [email protected] | ||
date : 10-01-2013 | ||
Description: | ||
the Servo class is a collection of routine used to control | ||
the motors through the electronic speed controllers. | ||
ESC and Servo use the same communication protocole: PWM. That is | ||
the reason why the servoblaster module is being used here. This allows | ||
to get rid of an external PIC controller to generate such PWM signal. | ||
The routines in the Serco class do the follwing: | ||
- open the /dev/servoblaster file in order to write in it | ||
- initlaize the ESC by sending a PWM of 1ms (~ throttle = 0) | ||
- write the desired PWM values | ||
*/ | ||
|
||
|
||
#include "servo.h" | ||
|
||
Servo ESC; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.