From f15390cf6d26e55d40ea820fb706f76a88ce6c99 Mon Sep 17 00:00:00 2001 From: Fabio Baltieri Date: Thu, 23 May 2013 23:38:40 +0200 Subject: [PATCH] control: Add forceTrigger() to API. --- openhantek/src/dsocontrol.h | 1 + openhantek/src/hantek/control.cpp | 5 +++++ openhantek/src/hantek/control.h | 1 + 3 files changed, 7 insertions(+), 0 deletions(-) diff --git a/openhantek/src/dsocontrol.h b/openhantek/src/dsocontrol.h index 4da6c91..3ee5483 100644 --- a/openhantek/src/dsocontrol.h +++ b/openhantek/src/dsocontrol.h @@ -90,6 +90,7 @@ class DsoControl : public QThread { virtual double setTriggerLevel(unsigned int channel, double level) = 0; ///< Set the trigger level for a channel virtual int setTriggerSlope(Dso::Slope slope) = 0; ///< Set the slope that causes triggering virtual double setPretriggerPosition(double position) = 0; ///< Set the pretrigger position (0.0 = left, 1.0 = right side) + virtual int forceTrigger() = 0; virtual int setChannelUsed(unsigned int channel, bool used) = 0; ///< Enable/disable a channel virtual int setCoupling(unsigned int channel, Dso::Coupling coupling) = 0; ///< Set the coupling for a channel diff --git a/openhantek/src/hantek/control.cpp b/openhantek/src/hantek/control.cpp index bf6756b..fe509c8 100644 --- a/openhantek/src/hantek/control.cpp +++ b/openhantek/src/hantek/control.cpp @@ -1298,6 +1298,11 @@ namespace Hantek { this->settings.trigger.slope = slope; return Dso::ERROR_NONE; } + + int Control::forceTrigger() { + this->commandPending[BULK_FORCETRIGGER] = true; + return 0; + } /// \brief Set the trigger position. /// \param position The new trigger position (in s). diff --git a/openhantek/src/hantek/control.h b/openhantek/src/hantek/control.h index 677877c..82541c5 100644 --- a/openhantek/src/hantek/control.h +++ b/openhantek/src/hantek/control.h @@ -269,6 +269,7 @@ namespace Hantek { double setTriggerLevel(unsigned int channel, double level); int setTriggerSlope(Dso::Slope slope); double setPretriggerPosition(double position); + int forceTrigger(); #ifdef DEBUG int stringCommand(QString command); -- libgit2 0.21.4