Renamed pixy_helper to pixy_frame. Updated docu of appliaction. added doxygen comments to pixy_{frame,control}.h
This commit is contained in:
@@ -21,9 +21,6 @@
|
|||||||
#define REG_PID_KD (0.001f)
|
#define REG_PID_KD (0.001f)
|
||||||
#define REG_PID_TA (0.01f)
|
#define REG_PID_TA (0.01f)
|
||||||
|
|
||||||
void int_init(void){
|
|
||||||
// TODO Init ports and outputs if needed.
|
|
||||||
}
|
|
||||||
|
|
||||||
// PID controller implementatoin for the y-axis
|
// PID controller implementatoin for the y-axis
|
||||||
int16_t pixy_PID_Y(int16_t x, int16_t w)
|
int16_t pixy_PID_Y(int16_t x, int16_t w)
|
||||||
|
|||||||
@@ -1,14 +1,41 @@
|
|||||||
/*
|
#ifndef PIXY_CONTROL_H_
|
||||||
* pixy_control.h
|
#define PIXY_CONTROL_H_
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _CONTROL_H_
|
|
||||||
#define _CONTROL_H_
|
|
||||||
|
|
||||||
#include<stdint.h>
|
#include<stdint.h>
|
||||||
|
|
||||||
void int_init(void);
|
/**
|
||||||
|
* @addtogroup app
|
||||||
|
*/
|
||||||
|
/*@{*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup pixy_control Pixy Control Helper
|
||||||
|
* A collection of helper functions that contain PID Control code used for object tracking.
|
||||||
|
*/
|
||||||
|
/*@}*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @addtogroup pixy_control
|
||||||
|
*/
|
||||||
|
/*@{*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute one step of PID regulation for the Y-servo.
|
||||||
|
* @param x desired value (e.g. current y-position of the biggest block)
|
||||||
|
* @param w actual value (e.g desired y-position)
|
||||||
|
* @return The offset which needs to be added to the Y-Servo position
|
||||||
|
*/
|
||||||
int16_t pixy_PID_Y(int16_t x, int16_t w);
|
int16_t pixy_PID_Y(int16_t x, int16_t w);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute one step of PID regulation for the X-servo.
|
||||||
|
* @param x desired value (e.g. current x-position of the biggest block)
|
||||||
|
* @param w actual value (e.g desired x-position)
|
||||||
|
* @return The offset which needs to be added to the X-Servo position
|
||||||
|
*/
|
||||||
int16_t pixy_PID_X(int16_t x, int16_t w);
|
int16_t pixy_PID_X(int16_t x, int16_t w);
|
||||||
|
|
||||||
#endif
|
/*@}*/
|
||||||
|
|
||||||
|
#endif /* PIXY_CONTROL_H_ */
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "pixy_helper.h"
|
#include "pixy_frame.h"
|
||||||
#include "pixy.h"
|
#include "pixy.h"
|
||||||
#include "tft.h"
|
#include "tft.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -1,10 +1,30 @@
|
|||||||
#ifndef PIXY_HELPER_H
|
#ifndef PIXY_FRAME_H
|
||||||
#define PIXY_HELPER_H
|
#define PIXY_FRAME_H
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "filesystem.h"
|
#include "filesystem.h"
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @addtogroup app
|
||||||
|
*/
|
||||||
|
/*@{*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup pixy_helper Pixy Frame Helper
|
||||||
|
* A collection of helper functions that allow receiving and rendering a frame from pixy onto the display.
|
||||||
|
* Furthermore you can select a color in a frame, to use for tracking.
|
||||||
|
*/
|
||||||
|
/*@}*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @addtogroup pixy_helper
|
||||||
|
*/
|
||||||
|
/*@{*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Receives a fullsized frame from pixy and display's it on the display with the topleft corner at (x,y)
|
* Receives a fullsized frame from pixy and display's it on the display with the topleft corner at (x,y)
|
||||||
* @param x The x-Coordinate of the top left corner
|
* @param x The x-Coordinate of the top left corner
|
||||||
@@ -56,4 +76,6 @@ int pixy_save_cropped_frame(FILE_HANDLE* handle, uint16_t xoffset, uint16_t yoff
|
|||||||
*/
|
*/
|
||||||
int pixy_cc_set_region(uint8_t signum, uint16_t xoffset, uint16_t yoffset, uint16_t width, uint16_t height);
|
int pixy_cc_set_region(uint8_t signum, uint16_t xoffset, uint16_t yoffset, uint16_t width, uint16_t height);
|
||||||
|
|
||||||
#endif /* PIXY_HELPER_H */
|
/*@}*/
|
||||||
|
|
||||||
|
#endif /* PIXY_FRAME_H */
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
#include "touch.h"
|
#include "touch.h"
|
||||||
#include "pixy.h"
|
#include "pixy.h"
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
#include "pixy_helper.h"
|
#include "pixy_frame.h"
|
||||||
|
|
||||||
static bool pixy_connected = false; //Whether or not the pixy cam is currently connected
|
static bool pixy_connected = false; //Whether or not the pixy cam is currently connected
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#include "tft.h"
|
#include "tft.h"
|
||||||
#include "touch.h"
|
#include "touch.h"
|
||||||
#include "pixy.h"
|
#include "pixy.h"
|
||||||
#include "pixy_helper.h"
|
#include "pixy_frame.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#include "touch.h"
|
#include "touch.h"
|
||||||
#include "pixy.h"
|
#include "pixy.h"
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
#include "pixy_helper.h"
|
#include "pixy_frame.h"
|
||||||
|
|
||||||
static volatile enum {detecting, idle,update_servos, update_ledcolor, update_ledcurrent} state; //Current state of the screen state machine
|
static volatile enum {detecting, idle,update_servos, update_ledcolor, update_ledcurrent} state; //Current state of the screen state machine
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
#include "touch.h"
|
#include "touch.h"
|
||||||
#include "pixy.h"
|
#include "pixy.h"
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
#include "pixy_helper.h"
|
#include "pixy_frame.h"
|
||||||
|
|
||||||
static BUTTON_STRUCT b_back; //Button to navigate back
|
static BUTTON_STRUCT b_back; //Button to navigate back
|
||||||
static BUTTON_STRUCT b_select; //Button to start the color region selection
|
static BUTTON_STRUCT b_select; //Button to start the color region selection
|
||||||
|
|||||||
BIN
doc/docu.odt
BIN
doc/docu.odt
Binary file not shown.
Reference in New Issue
Block a user