Renamed pixy_helper to pixy_frame. Updated docu of appliaction. added doxygen comments to pixy_{frame,control}.h

This commit is contained in:
t-moe
2015-06-07 19:03:29 +02:00
parent f432236628
commit c87220d192
9 changed files with 65 additions and 19 deletions

View File

@@ -21,9 +21,6 @@
#define REG_PID_KD (0.001f)
#define REG_PID_TA (0.01f)
void int_init(void){
// TODO Init ports and outputs if needed.
}
// PID controller implementatoin for the y-axis
int16_t pixy_PID_Y(int16_t x, int16_t w)

View File

@@ -1,14 +1,41 @@
/*
* pixy_control.h
*/
#ifndef _CONTROL_H_
#define _CONTROL_H_
#ifndef PIXY_CONTROL_H_
#define PIXY_CONTROL_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);
/**
* 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);
#endif
/*@}*/
#endif /* PIXY_CONTROL_H_ */

View File

@@ -1,4 +1,4 @@
#include "pixy_helper.h"
#include "pixy_frame.h"
#include "pixy.h"
#include "tft.h"
#include <stdlib.h>

View File

@@ -1,10 +1,30 @@
#ifndef PIXY_HELPER_H
#define PIXY_HELPER_H
#ifndef PIXY_FRAME_H
#define PIXY_FRAME_H
#include <stdbool.h>
#include <stdint.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)
* @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);
#endif /* PIXY_HELPER_H */
/*@}*/
#endif /* PIXY_FRAME_H */

View File

@@ -5,7 +5,7 @@
#include "touch.h"
#include "pixy.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

View File

@@ -4,7 +4,7 @@
#include "tft.h"
#include "touch.h"
#include "pixy.h"
#include "pixy_helper.h"
#include "pixy_frame.h"
#include <stdlib.h>
#include <string.h>

View File

@@ -5,7 +5,7 @@
#include "touch.h"
#include "pixy.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

View File

@@ -6,7 +6,7 @@
#include "touch.h"
#include "pixy.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_select; //Button to start the color region selection

Binary file not shown.