-
Notifications
You must be signed in to change notification settings - Fork 0
/
syncNetwork.hpp
50 lines (40 loc) · 1.17 KB
/
syncNetwork.hpp
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
#ifndef SYNCNetwork_HPP
#define SYNCNetwork_HPP
#include "network.hpp"
class SyncNetwork
{
private:
CNetwork Network;
typedef struct {
int nX;
int nY;
float fTheta;
} Position;
Position OdometryPositionData;
int m_nScannerData[271];
int m_nOdometryticks[4];
int m_nMotorPower[4];
float m_fCalculatedDrivingDirection;
float m_fTargetDrivingDirection;
float m_fVoltage;
int m_nLoopTicks;
bool m_bWasUpdated;
int m_nUpdateCounter;
public:
int InitNetwork ();
int Connect ();
void UpdateData ();
int* GetScannerData () {return m_nScannerData;}
int* GetOdometryTicks () {return m_nOdometryticks;}
int* GetMotorPower () {return m_nMotorPower;}
float GetCalculatedDrivingDirection () {return m_fCalculatedDrivingDirection;}
float GetTargetDrivingDirection () {return m_fTargetDrivingDirection;}
float GetVoltage () {return m_fVoltage;}
int GetLoopTicks () {return m_nLoopTicks;}
bool GetWasUpdated () {return m_bWasUpdated;}
void SetWasUpdated (bool bUpdated) {m_bWasUpdated = bUpdated;}
int GetUpdateCounter () {return m_nUpdateCounter;}
void ResetUpdateCounter () {m_nUpdateCounter = 0;}
Position* OdometryPosition () {return &OdometryPositionData;}
};
#endif