From 13c98cada7d9b9811fd70e6d98798e1caf3a5c4e Mon Sep 17 00:00:00 2001 From: Nick Foster Date: Mon, 25 Jun 2012 17:33:40 -0700 Subject: [PATCH 1/3] Fix SBS-1 output module (hopefully). --- python/modes_sbs1.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/modes_sbs1.py b/python/modes_sbs1.py index 68fc146..0f97d36 100644 --- a/python/modes_sbs1.py +++ b/python/modes_sbs1.py @@ -123,7 +123,7 @@ class modes_output_sbs1(modes_parse.modes_parse): elif msgtype == 17: outmsg = self.pp17(shortdata, longdata) else: - raise NoHandlerError + raise NoHandlerError(msgtype) return outmsg def pp0(self, shortdata, ecc): @@ -147,7 +147,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" From 0a1c49f1fcfb17160aa435eb83bfcf68ede0b162 Mon Sep 17 00:00:00 2001 From: Nick Foster Date: Tue, 26 Jun 2012 07:46:32 -0700 Subject: [PATCH 2/3] Check for unfilled SBS1 message before sending. --- python/modes_sbs1.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/modes_sbs1.py b/python/modes_sbs1.py index 0f97d36..bce8a0f 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) From d2ec78c50636b0d769a600fbde916f86a19bfbd9 Mon Sep 17 00:00:00 2001 From: Hoernchen Date: Mon, 16 Jul 2012 15:22:14 -0700 Subject: [PATCH 3/3] Fix for Windows build API exports. --- include/air_modes_preamble.h | 5 +++-- include/air_modes_slicer.h | 5 +++-- lib/air_modes_preamble.cc | 3 +-- lib/air_modes_slicer.cc | 3 +-- 4 files changed, 8 insertions(+), 8 deletions(-) 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 00e8f35..b29346c 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)); }