-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.h
38 lines (29 loc) · 851 Bytes
/
main.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef MAIN_H
#define MAIN_H
#ifdef __cplusplus
extern "C" {
#endif
#include "camera/dcmi_camera.h"
#include "msgbus/messagebus.h"
#include "parameter/parameter.h"
//constants for the differents parts of the project
#define IMAGE_BUFFER_SIZE 640
#define WIDTH_SLOPE 5
#define MIN_LINE_WIDTH 40
#define ROTATION_THRESHOLD 10
#define ROTATION_COEFF 2
#define PXTOCM 1570.0f //experimental value
#define GOAL_DISTANCE 10.0f
#define MAX_DISTANCE 25.0f
#define ERROR_THRESHOLD 0.1f //[cm] because of the noise of the camera
#define KP 800.0f
#define KI 3.5f //must not be zero
#define MAX_SUM_ERROR (MOTOR_SPEED_LIMIT/KI)
/** Robot wide IPC bus. */
extern messagebus_t bus;
extern parameter_namespace_t parameter_root;
void SendUint8ToComputer(uint8_t* data, uint16_t size);
#ifdef __cplusplus
}
#endif
#endif