From 6f381ee71d55f5fda14cb04a36640485a0621563 Mon Sep 17 00:00:00 2001 From: Soeren Apel Date: Thu, 27 Dec 2018 21:17:48 +0100 Subject: [PATCH] Abort acquisition if there are more than 64 logic channels --- pv/session.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pv/session.cpp b/pv/session.cpp index c0bcd67..7db96ff 100644 --- a/pv/session.cpp +++ b/pv/session.cpp @@ -982,6 +982,10 @@ void Session::sample_thread_proc(function error_handler) error_handler(e.what()); set_capture_state(Stopped); return; + } catch (QString& e) { + error_handler(e); + set_capture_state(Stopped); + return; } set_capture_state(Stopped); @@ -1163,6 +1167,9 @@ void Session::feed_in_logic(shared_ptr logic) return; } + if (logic->unit_size() > 8) + throw QString(tr("Can't handle more than 64 logic channels.")); + if (!cur_samplerate_) try { cur_samplerate_ = device_->read_config(ConfigKey::SAMPLERATE); -- 2.30.2