-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathGeogramONE.h
128 lines (119 loc) · 3.15 KB
/
GeogramONE.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
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
#include <avr/sleep.h>
#include <EEPROM.h>
#include "SIM900.h"
#include "PA6C.h"
#ifndef GeogramONE_h
#define GeogramONE_h
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
/*******EEPROM ADDRESSES**********/
#define PINCODE 0
#define SMSADDRESS 5
#define RETURNADDCONFIG 44
#define TIMEZONE 45 //use -4 for EST
#define DATEFORMAT 46 // 0 - mm/dd/yy , 1 - yy/mm/dd
#define ENGMETRIC 47 // 0 - English (mph, ft, etc...), 1 = Metric (kph, m, etc...)
#define GEODATAFORMAT1 48
#define GEODATAFORMAT2 50
#define BATTERYLOWLEVEL 52
#define APN 53
#define IOSTATE0 57
#define IOSTATE1 58
#define IOSTATE2 59
#define IOSTATE3 60
#define IOSTATE4 61
#define IOSTATE5 62
#define IOSTATE6 63
#define IOSTATE7 64
#define IOSTATE8 65
#define IOSTATE9 66
#define SLEEPTIMECONFIG 68
#define SLEEPTIMEON 69
#define SLEEPTIMEOFF 73
#define SPEEDLIMIT 77
#define SPEEDHYST 79
#define ACTIVE1 80
#define INOUT1 81
#define RADIUS1 82
#define LATITUDE1 86
#define LONGITUDE1 90
#define ACTIVE2 94
#define INOUT2 95
#define RADIUS2 96
#define LATITUDE2 100
#define LONGITUDE2 104
#define ACTIVE3 108
#define INOUT3 109
#define RADIUS3 110
#define LATITUDE3 114
#define LONGITUDE3 118
#define BREACHSPEED 122
#define BREACHREPS 123
#define BMA0X0F 124
#define BMA0X10 125
#define BMA0X11 126
#define BMA0X16 127
#define BMA0X17 128
#define BMA0X19 129
#define BMA0X1A 130
#define BMA0X1B 131
#define BMA0X20 132
#define BMA0X21 133
#define BMA0X25 134
#define BMA0X26 135
#define BMA0X27 136
#define BMA0X28 137
#define UDPSENDINTERVALBAT 138
#define UDPSENDINTERVALPLUG 142
#define UDPPOWERPROFILE 146
#define UDPSPEEDBAT 147
#define UDPSPEEDPLUG 148
#define SMSSENDINTERVALBAT 149
#define SMSSENDINTERVALPLUG 153
#define SMSPOWERPROFILE 157
#define SMSSPEEDBAT 158
#define SMSSPEEDPLUG 159
#define MOTIONMSG 200
#define BATTERYMSG 225
#define FENCE1MSG 250
#define FENCE2MSG 275
#define FENCE3MSG 300
#define SPEEDMSG 325
#define MAXSPEEDMSG 350
#define GEOGRAMONEID 375
#define D4MSG 400
#define D10MSG 425
#define HTTP1 450
#define HTTP2 500
#define HTTP3 550
#define IMEI 600
#define GPRS_APN 616
#define GPRS_USER 666
#define GPRS_PASS 691
#define GPRS_HOST 716
#define GPRS_PORT 732
#define UDP_HEADER 734
#define UDP_REPLY 745
/**********************************/
#define PG_INT 14
#define BMA_ADD (uint8_t)0x18
#define FUELGAUGE 0x36 //Fuel gauge I2C address
#define FUELGAUGEPIN 0x07 //Fuel gauge interrupt pin
class GeogramONE
{
public:
GeogramONE( );
void init( );
void goToSleep(uint8_t, bool, bool);
void configureIO( uint8_t, uint8_t );
void configureFence(uint8_t , geoFence *);
void configureBreachParameters(uint8_t *, uint8_t *);
void getFenceActive(uint8_t fenceNumber, uint8_t *fenceVar);
void configureSleepTime(uint32_t *, uint32_t *, uint8_t *);
void configureSpeed(uint8_t *, uint8_t *, uint16_t *);
private:
};
#endif