diff --git a/include/air_modes_preamble.h b/include/air_modes_preamble.h index 2158a5a..2b3aff3 100644 --- a/include/air_modes_preamble.h +++ b/include/air_modes_preamble.h @@ -24,17 +24,18 @@ #define INCLUDED_AIR_MODES_PREAMBLE_H #include +#include class air_modes_preamble; typedef boost::shared_ptr air_modes_preamble_sptr; -air_modes_preamble_sptr air_make_modes_preamble(int channel_rate, float threshold_db); +AIR_MODES_API air_modes_preamble_sptr air_make_modes_preamble(int channel_rate, float threshold_db); /*! * \brief mode select preamble detection * \ingroup block */ -class air_modes_preamble : public gr_block +class AIR_MODES_API air_modes_preamble : public gr_block { private: friend air_modes_preamble_sptr air_make_modes_preamble(int channel_rate, float threshold_db); diff --git a/include/air_modes_slicer.h b/include/air_modes_slicer.h index 5fe1da3..eb9e6a6 100644 --- a/include/air_modes_slicer.h +++ b/include/air_modes_slicer.h @@ -25,17 +25,18 @@ #include #include +#include class air_modes_slicer; typedef boost::shared_ptr air_modes_slicer_sptr; -air_modes_slicer_sptr air_make_modes_slicer(int channel_rate, gr_msg_queue_sptr queue); +AIR_MODES_API air_modes_slicer_sptr air_make_modes_slicer(int channel_rate, gr_msg_queue_sptr queue); /*! * \brief mode select slicer detection * \ingroup block */ -class air_modes_slicer : public gr_sync_block +class AIR_MODES_API air_modes_slicer : public gr_sync_block { private: friend air_modes_slicer_sptr air_make_modes_slicer(int channel_rate, gr_msg_queue_sptr queue); diff --git a/lib/air_modes_preamble.cc b/lib/air_modes_preamble.cc index f688a63..8046d78 100644 --- a/lib/air_modes_preamble.cc +++ b/lib/air_modes_preamble.cc @@ -29,9 +29,8 @@ #include #include #include -#include -AIR_MODES_API air_modes_preamble_sptr air_make_modes_preamble(int channel_rate, float threshold_db) +air_modes_preamble_sptr air_make_modes_preamble(int channel_rate, float threshold_db) { return air_modes_preamble_sptr (new air_modes_preamble(channel_rate, threshold_db)); } diff --git a/lib/air_modes_slicer.cc b/lib/air_modes_slicer.cc index 04c4dd2..1426d56 100644 --- a/lib/air_modes_slicer.cc +++ b/lib/air_modes_slicer.cc @@ -32,7 +32,6 @@ #include #include #include -#include extern "C" { @@ -40,7 +39,7 @@ extern "C" #include } -AIR_MODES_API air_modes_slicer_sptr air_make_modes_slicer(int channel_rate, gr_msg_queue_sptr queue) +air_modes_slicer_sptr air_make_modes_slicer(int channel_rate, gr_msg_queue_sptr queue) { return air_modes_slicer_sptr (new air_modes_slicer(channel_rate, queue)); } diff --git a/python/modes_sbs1.py b/python/modes_sbs1.py index 3f16b13..452d008 100644 --- a/python/modes_sbs1.py +++ b/python/modes_sbs1.py @@ -64,8 +64,9 @@ class modes_output_sbs1(modes_parse.modes_parse): def output(self, msg): try: sbs1_msg = self.parse(msg) - for conn in self._conns[:]: #iterate over a copy of the list - conn.send(sbs1_msg) + if sbs1_msg is not None: + for conn in self._conns[:]: #iterate over a copy of the list + conn.send(sbs1_msg) except socket.error: self._conns.remove(conn) print "Connections: ", len(self._conns) @@ -145,7 +146,7 @@ class modes_output_sbs1(modes_parse.modes_parse): def pp5(self, shortdata, ecc): # I'm not sure what to do with the identiifcation shortdata & 0x1FFF [datestr, timestr] = self.current_time() - [fs, dr, um, ident] = self.parse5(shortdata) + [fs, dr, um] = self.parse5(shortdata) aircraft_id = self.get_aircraft_id(ecc) retstr = "MSG,6,0,%i,%06X,%i,%s,%s,%s,%s,,,,,,,,," % (aircraft_id, ecc, aircraft_id+100, datestr, timestr, datestr, timestr) return retstr + self.decode_fs(fs) + "\n"