14.11.2012 Views

Submitted version of the thesis - Airlab, the Artificial Intelligence ...

Submitted version of the thesis - Airlab, the Artificial Intelligence ...

Submitted version of the thesis - Airlab, the Artificial Intelligence ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

106 Appendix B. Documentation <strong>of</strong> <strong>the</strong> programming<br />

}<br />

s16 left_speed[3] = { 550, 550, 550 };<br />

s16 right_speed[3] = { -550, -550, -550 };<br />

if (direction == LEFT) {<br />

Set_Speed(left_speed, NORMAL);<br />

} else {<br />

Set_Speed(right_speed, NORMAL);<br />

}<br />

MSDelay(100);<br />

Stop_Motor(3);<br />

MSDelay(100);<br />

————–Vision.h.——————<br />

/*<br />

* Vision.h<br />

*<br />

* Created on: Jan 19, 2011<br />

* Author: Administrator<br />

*/<br />

#ifndef VISION_H_<br />

#define VISION_H_<br />

/* Includes ------------------------------------------------------------------*/<br />

#include "91x_lib.h"<br />

#include "CamInt_x24.h"<br />

/* Exported types ------------------------------------------------------------*/<br />

/* Exported constants --------------------------------------------------------*/<br />

/* Module private variables --------------------------------------------------*/<br />

extern u8 *pImgBufferData;<br />

extern u32 BufferSize;<br />

/* Exported macro ------------------------------------------------------------*/<br />

/* Private functions ---------------------------------------------------------*/<br />

/* Exported functions ------------------------------------------------------- */<br />

void CalculateBallPosition(u8 X, u8 Y, u8 Dpx,<br />

double result[4]);<br />

void CalculatePositionTop(TPoint point, s16 result[3]);<br />

void CalculatePositionGround(TPoint point, s16 result[3]);<br />

void Blob_Search(void);<br />

#endif /* VISION_H_ */<br />

————–Vision.c.——————

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!