[hamradio-commits] [soapyhackrf] 01/07: New upstream version 0.2.2

Andreas E. Bombe aeb at moszumanska.debian.org
Mon Oct 24 17:03:19 UTC 2016


This is an automated email from the git hooks/post-receive script.

aeb pushed a commit to branch master
in repository soapyhackrf.

commit a036bd0670f5975889425da6968d992731b62b5f
Author: Andreas Bombe <aeb at debian.org>
Date:   Mon Oct 24 18:09:29 2016 +0200

    New upstream version 0.2.2
---
 Changelog.txt        |  3 ++-
 HackRF_Settings.cpp  |  2 +-
 HackRF_Streaming.cpp | 26 +++++++++++++-------------
 SoapyHackRF.hpp      |  8 +++++++-
 debian/changelog     |  6 ++++++
 debian/rules         |  0
 6 files changed, 29 insertions(+), 16 deletions(-)

diff --git a/Changelog.txt b/Changelog.txt
index dba3990..67d8516 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -1,6 +1,7 @@
-Release 0.2.2 (pending)
+Release 0.2.2 (2016-10-19)
 ==========================
 
+- New transceiver_mode_t enum for HackRF API changes
 - Clarified copyright statements in source files
 - Update debian files for SoapySDR module ABI format
 
diff --git a/HackRF_Settings.cpp b/HackRF_Settings.cpp
index b929e25..ab62a05 100644
--- a/HackRF_Settings.cpp
+++ b/HackRF_Settings.cpp
@@ -71,7 +71,7 @@ SoapyHackRF::SoapyHackRF( const SoapySDR::Kwargs &args )
 	_tx_stream->burst_samps=0;
 	_tx_stream->burst_end=false;
 
-	_current_mode=TRANSCEIVER_MODE_OFF;
+	_current_mode=HACKRF_TRANSCEIVER_MODE_OFF;
 
 	_auto_bandwidth=true;
 
diff --git a/HackRF_Streaming.cpp b/HackRF_Streaming.cpp
index 5b3e3de..fd74223 100644
--- a/HackRF_Streaming.cpp
+++ b/HackRF_Streaming.cpp
@@ -279,10 +279,10 @@ int SoapyHackRF::activateStream(
 		std::lock_guard<std::mutex> lock(_activate_mutex);
 
 
-		if(_current_mode==TRANSCEIVER_MODE_RX)
+		if(_current_mode==HACKRF_TRANSCEIVER_MODE_RX)
 			return 0;
 
-		if(_current_mode==TRANSCEIVER_MODE_TX){
+		if(_current_mode==HACKRF_TRANSCEIVER_MODE_TX){
 
 			if(_tx_stream->burst_end){
 
@@ -336,7 +336,7 @@ int SoapyHackRF::activateStream(
 			return SOAPY_SDR_STREAM_ERROR;
 
 		}
-			_current_mode = TRANSCEIVER_MODE_RX;
+			_current_mode = HACKRF_TRANSCEIVER_MODE_RX;
 
 	}
 
@@ -345,7 +345,7 @@ int SoapyHackRF::activateStream(
 		std::lock_guard<std::mutex> lock(_activate_mutex);
 
 		if((flags & SOAPY_SDR_END_BURST)!=0 and numElems!=0) {
-			if(_current_mode==TRANSCEIVER_MODE_RX){
+			if(_current_mode==HACKRF_TRANSCEIVER_MODE_RX){
 				_tx_stream->buf_head=0;
 				_tx_stream->buf_tail=0;
 				_tx_stream->burst_end = true;
@@ -353,10 +353,10 @@ int SoapyHackRF::activateStream(
 			}
 		}
 
-		if(_current_mode==TRANSCEIVER_MODE_TX)
+		if(_current_mode==HACKRF_TRANSCEIVER_MODE_TX)
 			return 0;
 
-		if(_current_mode==TRANSCEIVER_MODE_RX){
+		if(_current_mode==HACKRF_TRANSCEIVER_MODE_RX){
 
 			hackrf_stop_rx(_dev);
 		}
@@ -399,7 +399,7 @@ int SoapyHackRF::activateStream(
 			SoapySDR_logf(SOAPY_SDR_ERROR,"Activate TX Stream Failed.");
 			return SOAPY_SDR_STREAM_ERROR;
 		}
-			_current_mode = TRANSCEIVER_MODE_TX;
+			_current_mode = HACKRF_TRANSCEIVER_MODE_TX;
 
 	}
 
@@ -418,13 +418,13 @@ int SoapyHackRF::deactivateStream(
 
 		std::lock_guard<std::mutex> lock(_activate_mutex);
 
-		if(_current_mode==TRANSCEIVER_MODE_RX) {
+		if(_current_mode==HACKRF_TRANSCEIVER_MODE_RX) {
 
 			int ret = hackrf_stop_rx(_dev);
 			if (ret != HACKRF_SUCCESS) {
 				SoapySDR::logf(SOAPY_SDR_ERROR, "hackrf_stop_rx() failed -- %s", hackrf_error_name(hackrf_error(ret)));
 			}
-			_current_mode = TRANSCEIVER_MODE_OFF;
+			_current_mode = HACKRF_TRANSCEIVER_MODE_OFF;
 		}
 	}
 
@@ -432,12 +432,12 @@ int SoapyHackRF::deactivateStream(
 
 		std::lock_guard<std::mutex> lock(_activate_mutex);
 
-		if(_current_mode==TRANSCEIVER_MODE_TX) {
+		if(_current_mode==HACKRF_TRANSCEIVER_MODE_TX) {
 			int ret = hackrf_stop_tx(_dev);
 			if (ret != HACKRF_SUCCESS) {
 				SoapySDR::logf(SOAPY_SDR_ERROR, "hackrf_stop_tx() failed -- %s", hackrf_error_name(hackrf_error(ret)));
 			}
-			_current_mode = TRANSCEIVER_MODE_OFF;
+			_current_mode = HACKRF_TRANSCEIVER_MODE_OFF;
 		}
 
 	}
@@ -689,7 +689,7 @@ int SoapyHackRF::acquireReadBuffer(
 		return SOAPY_SDR_NOT_SUPPORTED;
 	}
 
-	if ( _current_mode!=TRANSCEIVER_MODE_RX ) {
+	if ( _current_mode!=HACKRF_TRANSCEIVER_MODE_RX ) {
 
 		//wait for tx to be consumed before switching
 		const auto exitTime = std::chrono::high_resolution_clock::now() + std::chrono::microseconds(timeoutUs);
@@ -754,7 +754,7 @@ int SoapyHackRF::acquireWriteBuffer(
 		return SOAPY_SDR_NOT_SUPPORTED;
 	}
 
-	if(_current_mode!=TRANSCEIVER_MODE_TX) {
+	if(_current_mode!=HACKRF_TRANSCEIVER_MODE_TX) {
 		int ret=this->activateStream(stream);
 		if(ret<0) return ret;
 	}
diff --git a/SoapyHackRF.hpp b/SoapyHackRF.hpp
index 885c6f0..53c5547 100644
--- a/SoapyHackRF.hpp
+++ b/SoapyHackRF.hpp
@@ -42,6 +42,12 @@ enum HackRF_Format {
 	HACKRF_FORMAT_FLOAT64 =3,
 };
 
+typedef enum {
+	HACKRF_TRANSCEIVER_MODE_OFF = 0,
+	HACKRF_TRANSCEIVER_MODE_RX = 1,
+	HACKRF_TRANSCEIVER_MODE_TX = 2,
+} HackRF_transceiver_mode_t;
+
 
 /*!
  * The session object manages hackrf_init/exit
@@ -368,7 +374,7 @@ private:
 	std::mutex	_buf_mutex;
 	std::condition_variable _buf_cond;
 
-	transceiver_mode_t _current_mode;
+	HackRF_transceiver_mode_t _current_mode;
 
 	SoapyHackRFSession _sess;
 };
diff --git a/debian/changelog b/debian/changelog
index ab4be00..7ef1c22 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+soapyhackrf (0.2.2) unstable; urgency=low
+
+  * Release 0.2.2 (2016-10-19)
+
+ -- Josh Blum <josh at pothosware.com>  Wed, 19 Oct 2016 11:25:17 -0700
+
 soapyhackrf (0.2.1) unstable; urgency=low
 
   * Release 0.2.1 (2016-02-29)
diff --git a/debian/rules b/debian/rules
old mode 100755
new mode 100644

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/soapyhackrf.git



More information about the pkg-hamradio-commits mailing list