Skip to content

Commit 41254ea

Browse files
committed
Merge branch 'development' of https://github.com/open-ephys/plugin-GUI into development
2 parents c0ca9ed + 3b0564a commit 41254ea

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

Source/Utils/OpenEphysHttpServer.h

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -517,11 +517,19 @@ class OpenEphysHttpServer : juce::Thread {
517517

518518
svr_->Get("/api/processors/clear", [this](const httplib::Request&, httplib::Response& res) {
519519

520-
const MessageManagerLock mml;
520+
String return_msg;
521+
522+
if (!CoreServices::getAcquisitionStatus())
523+
{
524+
const MessageManagerLock mml;
525+
graph_->clearSignalChain();
526+
return_msg = "Signal chain cleared successfully.";
527+
} else {
528+
return_msg = "Cannot clear signal chain while acquisition is active!";
529+
}
521530

522-
graph_->clearSignalChain();
523531
json ret;
524-
status_to_json(graph_, &ret);
532+
ret["info"] = return_msg.toStdString();
525533
res.set_content(ret.dump(), "application/json");
526534
});
527535

0 commit comments

Comments
 (0)