forked from cubesatplatform/basestation_basic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbasestation_basic.ino
58 lines (44 loc) · 1.09 KB
/
basestation_basic.ino
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
#include <string>
#include <consoleio.h>
#include <messages.h>
#include <boards.h>
#include <sdfs.h>
#include "basestation.h"
#define SYSNAME "BS2"
std::map<std::string,CSystemObject *> SysMap;
std::string CSystemObject::_IAM=SYSNAME;
std::string CSystemObject::_defaultTO="ADR1";
CBaseStation bs;
CMessages* getMessages(){return &bs.MSG;}
void setup() {
bs.Name(SYSNAME);
Serial.begin(115200);
while(!Serial){};
// Serial2.begin(115200,SERIAL_8N1,35,15);
// sendSerial("Init");
#ifdef TTGO1
initBoard();
#endif
writeconsoleln("Starting Basestation BASIC: ");
delay(1000);
CMsg m;
m.setSYS("MESSAGES");
m.setACT("PINHIGH");
m.setVALUE("1");
m.setML("TRANSMITLIST");
m.setPROCESSTIME(10000*1);
m.writetoconsole();
bs.addMessageList(m);
m.setPROCESSTIME(10000*2);
m.writetoconsole();
bs.addMessageList(m);
m.setPROCESSTIME(10000*3);
m.writetoconsole();
bs.addMessageList(m);
m.setPROCESSTIME(10000*4);
m.writetoconsole();
bs.addMessageList(m);
}
void loop(){
bs.loop();
}