From: Soeren Apel Date: Thu, 27 Dec 2018 20:17:48 +0000 (+0100) Subject: Abort acquisition if there are more than 64 logic channels X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=6f381ee71d55f5fda14cb04a36640485a0621563;p=pulseview.git Abort acquisition if there are more than 64 logic channels --- diff --git a/pv/session.cpp b/pv/session.cpp index c0bcd670..7db96ff0 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);