Commit e081793807e74eafd8e449b21684b11a46b13168
1 parent
55bcdc0f
Set invalid instead of DSO-2090 command variants as default
Showing
1 changed file
with
19 additions
and
14 deletions
openhantek/src/hantek/control.cpp
| ... | ... | @@ -42,15 +42,15 @@ namespace Hantek { |
| 42 | 42 | /// \param parent The parent widget. |
| 43 | 43 | Control::Control(QObject *parent) : DsoControl(parent) { |
| 44 | 44 | // Use DSO-2090 specification as default |
| 45 | - this->specification.command.bulk.setRecordLength = BULK_SETTRIGGERANDSAMPLERATE; | |
| 46 | - this->specification.command.bulk.setFilter = BULK_SETFILTER; | |
| 47 | - this->specification.command.bulk.setGain = BULK_SETGAIN; | |
| 48 | - this->specification.command.bulk.setSamplerate = BULK_SETTRIGGERANDSAMPLERATE; | |
| 49 | - this->specification.command.bulk.setTrigger = BULK_SETTRIGGERANDSAMPLERATE; | |
| 50 | - this->specification.command.bulk.setPretrigger = BULK_SETTRIGGERANDSAMPLERATE; | |
| 51 | - this->specification.command.control.setOffset = CONTROL_SETOFFSET; | |
| 52 | - this->specification.command.control.setRelays = CONTROL_SETRELAYS; | |
| 53 | - this->specification.command.values.offsetLimits = VALUE_OFFSETLIMITS; | |
| 45 | + this->specification.command.bulk.setRecordLength = (BulkCode) -1; | |
| 46 | + this->specification.command.bulk.setFilter = (BulkCode) -1; | |
| 47 | + this->specification.command.bulk.setGain = (BulkCode) -1; | |
| 48 | + this->specification.command.bulk.setSamplerate = (BulkCode) -1; | |
| 49 | + this->specification.command.bulk.setTrigger = (BulkCode) -1; | |
| 50 | + this->specification.command.bulk.setPretrigger = (BulkCode) -1; | |
| 51 | + this->specification.command.control.setOffset = (ControlCode) -1; | |
| 52 | + this->specification.command.control.setRelays = (ControlCode) -1; | |
| 53 | + this->specification.command.values.offsetLimits = (ControlValue) -1; | |
| 54 | 54 | this->specification.command.values.voltageLimits = (ControlValue) -1; |
| 55 | 55 | |
| 56 | 56 | this->specification.samplerate.single.base = 50e6; |
| ... | ... | @@ -551,12 +551,12 @@ namespace Hantek { |
| 551 | 551 | this->command[BULK_GETCAPTURESTATE] = new BulkGetCaptureState(); |
| 552 | 552 | this->command[BULK_SETGAIN] = new BulkSetGain(); |
| 553 | 553 | // Initialize the command versions to the ones used on the DSO-2090 |
| 554 | - this->specification.command.bulk.setRecordLength = BULK_SETTRIGGERANDSAMPLERATE; | |
| 555 | - this->specification.command.bulk.setFilter = BULK_SETFILTER; | |
| 554 | + this->specification.command.bulk.setRecordLength = (BulkCode) -1; | |
| 555 | + this->specification.command.bulk.setFilter = (BulkCode) -1; | |
| 556 | 556 | this->specification.command.bulk.setGain = BULK_SETGAIN; |
| 557 | - this->specification.command.bulk.setSamplerate = BULK_SETTRIGGERANDSAMPLERATE; | |
| 558 | - this->specification.command.bulk.setTrigger = BULK_SETTRIGGERANDSAMPLERATE; | |
| 559 | - this->specification.command.bulk.setPretrigger = BULK_SETTRIGGERANDSAMPLERATE; | |
| 557 | + this->specification.command.bulk.setSamplerate = (BulkCode) -1; | |
| 558 | + this->specification.command.bulk.setTrigger = (BulkCode) -1; | |
| 559 | + this->specification.command.bulk.setPretrigger = (BulkCode) -1; | |
| 560 | 560 | this->specification.command.control.setOffset = CONTROL_SETOFFSET; |
| 561 | 561 | this->specification.command.control.setRelays = CONTROL_SETRELAYS; |
| 562 | 562 | this->specification.command.values.offsetLimits = VALUE_OFFSETLIMITS; |
| ... | ... | @@ -572,6 +572,11 @@ namespace Hantek { |
| 572 | 572 | // Instantiate additional commands for the DSO-2090 |
| 573 | 573 | this->command[BULK_SETFILTER] = new BulkSetFilter(); |
| 574 | 574 | this->command[BULK_SETTRIGGERANDSAMPLERATE] = new BulkSetTriggerAndSamplerate(); |
| 575 | + this->specification.command.bulk.setRecordLength = BULK_SETTRIGGERANDSAMPLERATE; | |
| 576 | + this->specification.command.bulk.setFilter = BULK_SETFILTER; | |
| 577 | + this->specification.command.bulk.setSamplerate = BULK_SETTRIGGERANDSAMPLERATE; | |
| 578 | + this->specification.command.bulk.setTrigger = BULK_SETTRIGGERANDSAMPLERATE; | |
| 579 | + this->specification.command.bulk.setPretrigger = BULK_SETTRIGGERANDSAMPLERATE; | |
| 575 | 580 | // Initialize those as pending |
| 576 | 581 | this->commandPending[BULK_SETFILTER] = true; |
| 577 | 582 | this->commandPending[BULK_SETTRIGGERANDSAMPLERATE] = true; | ... | ... |