Skip to content

Commit ca6131c

Browse files
committed
upwards and onwards
1 parent 4d075f4 commit ca6131c

File tree

6 files changed

+13
-12
lines changed

6 files changed

+13
-12
lines changed

Application/Receiver.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ class Receiver {
160160
// Receiver output are Messages or JSON
161161
Connection<AIS::Message>& Output(int i) { return models[i]->Output().out; }
162162
Connection<AIS::GPS>& OutputGPS(int i) { return models[i]->OutputGPS().out; }
163-
Connection<Plane::ADSB>& OutputADSB(int i) { return models[i]->OutputADSB().out; }
163+
Connection<JSON::JSON>& OutputADSB(int i) { return models[i]->OutputADSB().out; }
164164

165165
Connection<JSON::JSON>& OutputJSON(int i) { return jsonais[i].out; }
166166

Application/WebViewer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ void WebViewer::connect(Receiver &r)
313313

314314
r.OutputJSON(j).Connect((StreamIn<JSON::JSON> *)&ships);
315315
r.OutputGPS(j).Connect((StreamIn<AIS::GPS> *)&ships);
316-
r.OutputADSB(j).Connect((StreamIn<Plane::ADSB> *)&planes);
316+
r.OutputADSB(j).Connect((StreamIn<JSON::JSON> *)&planes);
317317

318318
*r.device >> raw_counter;
319319
}

DSP/Model.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,18 +73,18 @@ namespace AIS
7373

7474
// idea is to avoid that message threads from different devices cause issues downstream (e.g. with sending UDP or updating the database).
7575
// can also be done further downstream
76-
class MessageMutexADSB : public SimpleStreamInOut<Plane::ADSB, Plane::ADSB>
76+
class MessageMutexADSB : public SimpleStreamInOut<JSON::JSON, JSON::JSON>
7777
{
7878
static std::mutex mtx;
7979

8080
public:
8181
virtual ~MessageMutexADSB() {}
82-
virtual void Receive(const Plane::ADSB *data, int len, TAG &tag)
82+
virtual void Receive(const JSON::JSON *data, int len, TAG &tag)
8383
{
8484
std::lock_guard<std::mutex> lock(mtx);
8585
Send(data, len, tag);
8686
}
87-
virtual void Receive(Plane::ADSB *data, int len, TAG &tag)
87+
virtual void Receive(JSON::JSON *data, int len, TAG &tag)
8888
{
8989
std::lock_guard<std::mutex> lock(mtx);
9090
Send(data, len, tag);
@@ -114,7 +114,7 @@ namespace AIS
114114

115115
StreamOut<Message> &Output() { return output; }
116116
StreamOut<GPS> &OutputGPS() { return output_gps; }
117-
StreamOut<Plane::ADSB> &OutputADSB() { return outputADSB; }
117+
StreamOut<JSON::JSON> &OutputADSB() { return outputADSB; }
118118

119119
void setName(std::string s) { name = s; }
120120
std::string getName() { return name; }

Library/Basestation.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include "Keys.h"
2727
#include "ADSB.h"
2828

29-
class Basestation : public SimpleStreamInOut<RAW, Plane::ADSB>
29+
class Basestation : public SimpleStreamInOut<RAW, JSON::JSON>
3030
{
3131
std::string line;
3232

@@ -152,7 +152,7 @@ class Basestation : public SimpleStreamInOut<RAW, Plane::ADSB>
152152

153153
//msg.Print();
154154

155-
Send(&msg, 1, tag);
155+
//Send(&msg, 1, tag);
156156
}
157157

158158
public:

Library/Beast.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <sstream>
77
#include <stdexcept>
88

9-
class Beast : public SimpleStreamInOut<RAW, Plane::ADSB>
9+
class Beast : public SimpleStreamInOut<RAW, JSON::JSON>
1010
{
1111
static constexpr size_t MAX_MESSAGE_SIZE = 1024; // Reasonable maximum size
1212
static constexpr double BEAST_CLOCK_MHZ = 12.0; // 12 MHz clock rate

Tracking/PlaneDB.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "ADSB.h"
22
#include "Stream.h"
33

4-
class PlaneDB : public StreamIn<Plane::ADSB>
4+
class PlaneDB : public StreamIn<JSON::JSON>
55
{
66
std::mutex mtx;
77
private:
@@ -66,9 +66,9 @@ class PlaneDB : public StreamIn<Plane::ADSB>
6666
return -1;
6767
}
6868

69-
void Receive(const Plane::ADSB* msg, int len, TAG& tag) {
69+
void Receive(const JSON::JSON* msg, int len, TAG& tag) {
7070
std::lock_guard<std::mutex> lock(mtx);
71-
71+
/*
7272
// Skip invalid messages
7373
if (msg->getHexIdent() == 0) return;
7474
@@ -136,6 +136,7 @@ class PlaneDB : public StreamIn<Plane::ADSB>
136136
tag.lat = msg->getLat();
137137
tag.lon = msg->getLon();
138138
}
139+
*/
139140
}
140141

141142
std::string getCompactArray(bool include_inactive = false) {

0 commit comments

Comments
 (0)