-
Notifications
You must be signed in to change notification settings - Fork 0
/
beacon.cpp
86 lines (65 loc) · 1.24 KB
/
beacon.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
#include "beacon.h"
Beacon::Beacon(void) {
};
uint32_t Beacon::getId(void) {
return _id;
};
void Beacon::setId(uint32_t id) {
_id = id;
};
void Beacon::setPos(double lat, double lon, double alt) {
_lat = lat;
_lon = lon;
_alt = alt;
_hasPos = true;
};
double Beacon::getLat(void) {
return _lat;
}
double Beacon::getLon(void) {
return _lon;
}
double Beacon::getAlt(void) {
return _alt;
}
void Beacon::setLat(double lat) {
_lat = lat;
_hasPos = true;
}
void Beacon::setLon(double lon) {
_lon = lon;
_hasPos = true;
}
void Beacon::setAlt(double alt) {
_alt = alt;
}
uint8_t Beacon::getRssi(void) {
return _rssi;
};
void Beacon::setRssi(uint8_t value) {
_rssi = value;
};
uint8_t Beacon::getSnr(void) {
return _snr;
};
void Beacon::setSnr(uint8_t value) {
_snr = value;
};
uint32_t Beacon::getLastContactMillis(void) {
return _lastContactMillis;
};
void Beacon::setLastContactMillis(uint32_t value) {
_lastContactMillis = value;
}
bool Beacon::hasPos(void) {
return _hasPos;
};
void Beacon::setCourse(int course) {
_course = course;
}
void Beacon::setAction(uint8_t action) {
_action = action;
}
void Beacon::setFlags(uint8_t flags) {
_flags = flags;
}