Revision bdac5bec devices/DiWheelDrive/amiro_map.hpp
devices/DiWheelDrive/amiro_map.hpp | ||
---|---|---|
6 | 6 |
#include <amiroosconf.h> |
7 | 7 |
#include <ch.hpp> |
8 | 8 |
|
9 |
|
|
9 | 10 |
namespace amiro { |
10 | 11 |
|
11 | 12 |
struct node { |
... | ... | |
27 | 28 |
// Next node ID |
28 | 29 |
uint8_t next; |
29 | 30 |
//Traveled Distance between current and next in % |
30 |
uint8_t dist;
|
|
31 |
uint32_t dist;
|
|
31 | 32 |
// True if the current loaded map is valid |
32 | 33 |
bool valid; |
34 |
// Length of the currently traveled edge |
|
35 |
uint32_t eLength; |
|
33 | 36 |
}; |
34 | 37 |
|
35 | 38 |
class AmiroMap { |
... | ... | |
58 | 61 |
* |
59 | 62 |
* |
60 | 63 |
*/ |
61 |
void update(LineFollowStrategy strategy);
|
|
64 |
uint8_t update(uint16_t WL, uint16_t WR, LineFollowStrategy strategy);
|
|
62 | 65 |
|
63 | 66 |
private: |
64 | 67 |
Global *global; |
... | ... | |
83 | 86 |
* |
84 | 87 |
*/ |
85 | 88 |
void visitNode(uint8_t id); |
89 |
|
|
90 |
/** |
|
91 |
* Calculate the distance between two given points |
|
92 |
* |
|
93 |
* @param p1 point 1 |
|
94 |
* @param p2 point 2 |
|
95 |
* |
|
96 |
*/ |
|
97 |
uint32_t calculateDist(types::position *p1, types::position *p2); |
|
86 | 98 |
}; |
87 | 99 |
}; // namespace amiro |
88 | 100 |
|
Also available in: Unified diff