-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEngineStub.cpp
129 lines (111 loc) · 2.53 KB
/
EngineStub.cpp
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#include "EngineStub.hpp"
#include "Robot.hpp"
extern "C" {
#include "../../engine.h"
}
extern "C" {
#include "../../odometry.h"
}
/**
* Initializes internal data structures.
* */
void engine_init()
{
}
/**
* This function advances the time of the engine by
* ms milliseconds.
* After this it checks if the current sequence is
* done and if it needs to switch to the next step.
* Finally it computes the servo angles for all
* servos and sets them.
* @arg ms Time in ms that the engine will be moved forward
* */
void engine_advance(int ms)
{
}
short unsigned int engine_getAngle(struct Step *curStep, short unsigned int time, enum Servos servo)
{
return 0;
}
/**
* This function sets a new step for the given index
*
* @arg stepIndex The index at which the give step will be saved
* @arg newData The step that will be saved at the given index.
* Note: The data will be copied, the pointer may be discarded
* after the function call.
* */
void engine_setNewStepData(unsigned int stepIndex, struct Step *newData)
{
}
/**
* This function sets a new Sequence of steps that will
* be executed. This function will override any previous
* given step sequence, but will not stop the execution of
* the current step.
* */
void engine_setNewStepSequence(struct StepSequence *sequence)
{
}
/**
* Registeres a callback that will be called every time
* a new step is executed.
* */
void engine_registerStepChangeCallback(void (*callback)(unsigned int stepIndex))
{
}
/**
* Returns if the current sequence is
* finished.
* @return 0 if not finished 1 if finished
* */
unsigned char engine_isSequenceFinished()
{
}
/**
* Returns if the current step is
* finished.
* @return 0 if not finished 1 if finished
* */
unsigned char engine_isStepFinished()
{
}
/**
* Initializes internal data structures
* */
void odometry_init()
{
}
/**
* This function sets the odometry for a given
* stepIndex.
* The given odometry should match the step that is
* referenced by the stepIndex.
* */
void odometry_setOdometryForStep(int stepIndex, struct OdometryOfStep *odmetry)
{
}
/**
* Set the current position and orientation of
* the Robot.
* */
void odometry_setCurPose(struct Transform2D *pose)
{
}
/**
* This function computes the next position
* of the robot unter the assumption that
* a step, reference by stepindex, was
* executed.
* */
void odometry_calculateNewPosition(unsigned int stepIndex)
{
}
/**
* Returns the odometry position and rotation
* of the robot.
* */
struct Transform2D *odometry_getPose()
{
}