Skip to content
Snippets Groups Projects
Verified Commit 4f482b4b authored by Tobias Triffterer's avatar Tobias Triffterer :house_with_garden:
Browse files

Add Command Implementation for ADC Threshold

Extend the Command class to use the recently added actions in the
protocol.
parent a324be73
No related branches found
No related tags found
No related merge requests found
Pipeline #3111 passed with stage
in 23 seconds
......@@ -89,6 +89,8 @@ Command Command::fromString(const QString& source)
case Action::startAdc:
case Action::stopAdc:
case Action::clearHistogram:
case Action::adcThresholdUp:
case Action::adcThresholdDown:
return Command(action, Arguments(), token);
case Action::error:
return parseError(rootobj);
......@@ -133,6 +135,10 @@ Action Command::parseActionString(const QString& string)
return Action::fillHistogram;
if (string == QStringLiteral("clearHistogram"))
return Action::clearHistogram;
if (string == QStringLiteral("adcThresholdUp"))
return Action::adcThresholdUp;
if (string == QStringLiteral("adcThresholdDown"))
return Action::adcThresholdDown;
if (string == QStringLiteral("error"))
return Action::error;
......@@ -306,6 +312,10 @@ QString Command::getActionString(const Action action)
return QStringLiteral("fillHistogram");
case Action::clearHistogram:
return QStringLiteral("clearHistogram");
case Action::adcThresholdUp:
return QStringLiteral("adcThresholdUp");
case Action::adcThresholdDown:
return QStringLiteral("adcThresholdDown");
case Action::error:
return QStringLiteral("error");
case Action::invalid:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment