Commit f15390cf6d26e55d40ea820fb706f76a88ce6c99
Committed by
David Graeff
1 parent
373e65b9
control: Add forceTrigger() to API.
Showing
3 changed files
with
7 additions
and
0 deletions
openhantek/src/dsocontrol.h
| ... | ... | @@ -90,6 +90,7 @@ class DsoControl : public QThread { |
| 90 | 90 | virtual double setTriggerLevel(unsigned int channel, double level) = 0; ///< Set the trigger level for a channel |
| 91 | 91 | virtual int setTriggerSlope(Dso::Slope slope) = 0; ///< Set the slope that causes triggering |
| 92 | 92 | virtual double setPretriggerPosition(double position) = 0; ///< Set the pretrigger position (0.0 = left, 1.0 = right side) |
| 93 | + virtual int forceTrigger() = 0; | |
| 93 | 94 | |
| 94 | 95 | virtual int setChannelUsed(unsigned int channel, bool used) = 0; ///< Enable/disable a channel |
| 95 | 96 | virtual int setCoupling(unsigned int channel, Dso::Coupling coupling) = 0; ///< Set the coupling for a channel | ... | ... |
openhantek/src/hantek/control.cpp
| ... | ... | @@ -1298,6 +1298,11 @@ namespace Hantek { |
| 1298 | 1298 | this->settings.trigger.slope = slope; |
| 1299 | 1299 | return Dso::ERROR_NONE; |
| 1300 | 1300 | } |
| 1301 | + | |
| 1302 | + int Control::forceTrigger() { | |
| 1303 | + this->commandPending[BULK_FORCETRIGGER] = true; | |
| 1304 | + return 0; | |
| 1305 | + } | |
| 1301 | 1306 | |
| 1302 | 1307 | /// \brief Set the trigger position. |
| 1303 | 1308 | /// \param position The new trigger position (in s). | ... | ... |
openhantek/src/hantek/control.h
| ... | ... | @@ -269,6 +269,7 @@ namespace Hantek { |
| 269 | 269 | double setTriggerLevel(unsigned int channel, double level); |
| 270 | 270 | int setTriggerSlope(Dso::Slope slope); |
| 271 | 271 | double setPretriggerPosition(double position); |
| 272 | + int forceTrigger(); | |
| 272 | 273 | |
| 273 | 274 | #ifdef DEBUG |
| 274 | 275 | int stringCommand(QString command); | ... | ... |