]> sigrok.org Git - pulseview.git/commitdiff
Abort acquisition if there are more than 64 logic channels
authorSoeren Apel <redacted>
Thu, 27 Dec 2018 20:17:48 +0000 (21:17 +0100)
committerSoeren Apel <redacted>
Thu, 27 Dec 2018 20:17:48 +0000 (21:17 +0100)
pv/session.cpp

index c0bcd670de26d0af866bf9cb87705ad506d5a57e..7db96ff0abf568d0199d948afc7853bbbf499b9c 100644 (file)
@@ -982,6 +982,10 @@ void Session::sample_thread_proc(function<void (const QString)> 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> 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<uint64_t>(ConfigKey::SAMPLERATE);