Skip to content

Commit

Permalink
new SCPI command: delete traces
Browse files Browse the repository at this point in the history
  • Loading branch information
jankae committed Dec 7, 2024
1 parent 8be8258 commit a5b9195
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
Binary file modified Documentation/UserManual/ProgrammingGuide.pdf
Binary file not shown.
8 changes: 7 additions & 1 deletion Documentation/UserManual/ProgrammingGuide.tex
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ \subsubsection{VNA:TRACe:DATA}
[5.33344e+9,0.13223,-0.00780554],
[6e+9,-0.0314859,-0.246024]
\end{example}
\vspace{-0.6cm}
\vspace{-0.3cm}
\begin{center}
\footnotesize{Note: actual response will not include newlines between data points, only at the end}
\end{center}
Expand Down Expand Up @@ -557,6 +557,9 @@ \subsubsection{VNA:TRACe:MINAmplitude}
\subsubsection{VNA:TRACe:NEW}
\event{Creates a new trace}{VNA:TRACe:NEW}{<trace name>}

\subsubsection{VNA:TRACe:DELete}
\event{Deletes a trace}{VNA:TRACe:DELete}{<trace>, either by name or by index}

\subsubsection{VNA:TRACe:RENAME}
\event{Changes the name of a trace}{VNA:TRACe:RENAME}{<trace>, either by name or by index\\<new name>}

Expand Down Expand Up @@ -835,6 +838,9 @@ \subsubsection{SA:TRACe:MINAmplitude}
\subsubsection{SA:TRACe:NEW}
\event{Creates a new trace}{SA:TRACe:NEW}{<trace name>}

\subsubsection{SA:TRACe:DELete}
\event{Deletes a trace}{VNA:TRACe:DELete}{<trace>, either by name or by index}

\subsubsection{SA:TRACe:RENAME}
\event{Changes the name of a trace}{SA:TRACe:RENAME}{<trace>, either by name or by index\\<new name>}

Expand Down
8 changes: 8 additions & 0 deletions Software/PC_Application/LibreVNA-GUI/Traces/tracewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,14 @@ void TraceWidget::SetupSCPI()
model.addTrace(t);
return SCPI::getResultName(SCPI::Result::Empty);
}, nullptr));
add(new SCPICommand("DELete", [=](QStringList params) -> QString {
auto t = findTrace(params);
if(!t) {
return SCPI::getResultName(SCPI::Result::Error);
}
model.removeTrace(t);
return SCPI::getResultName(SCPI::Result::Empty);
}, nullptr));
add(new SCPICommand("RENAME", [=](QStringList params) -> QString {
auto t = findTrace(params);
if(!t) {
Expand Down

0 comments on commit a5b9195

Please sign in to comment.