Commit a4f5dc7e225b0697369a32576443ab07aee650c6

Authored by oliverhaag
1 parent cc62c4d0

Small bugfix and correct samplerates for DSO-2150

openhantek/ChangeLog
@@ -81,3 +81,7 @@ @@ -81,3 +81,7 @@
81 81
82 2010-09-15 Oliver Haag <oliver.haag@gmail.com> 82 2010-09-15 Oliver Haag <oliver.haag@gmail.com>
83 * Added OSX patches by Florian Schirmer <jolt@tuxbox.org>, thanks :) 83 * Added OSX patches by Florian Schirmer <jolt@tuxbox.org>, thanks :)
  84 +
  85 +2010-09-16 Oliver Haag <oliver.haag@gmail.com>
  86 +* Added csv export return value to doExport method
  87 +* Fixed DSO-2150 samplerates
openhantek/src/exporter.cpp
@@ -387,5 +387,7 @@ bool Exporter::doExport() { @@ -387,5 +387,7 @@ bool Exporter::doExport() {
387 } 387 }
388 388
389 csvFile.close(); 389 csvFile.close();
  390 +
  391 + return true;
390 } 392 }
391 } 393 }
openhantek/src/hantek/control.cpp
@@ -43,6 +43,7 @@ namespace Hantek { @@ -43,6 +43,7 @@ namespace Hantek {
43 this->gainSteps << 0.08 << 0.16 << 0.40 << 0.80 << 1.60 << 4.00 43 this->gainSteps << 0.08 << 0.16 << 0.40 << 0.80 << 1.60 << 4.00
44 << 8.0 << 16.0 << 40.0; 44 << 8.0 << 16.0 << 40.0;
45 this->samplerateChannelMax = 50e6; 45 this->samplerateChannelMax = 50e6;
  46 + this->samplerateFastMax = 100e6;
46 this->samplerateMax = this->samplerateChannelMax; 47 this->samplerateMax = this->samplerateChannelMax;
47 this->samplerateDivider = 1; 48 this->samplerateDivider = 1;
48 this->triggerPosition = 0; 49 this->triggerPosition = 0;
@@ -534,14 +535,17 @@ namespace Hantek { @@ -534,14 +535,17 @@ namespace Hantek {
534 case MODEL_DSO2090: 535 case MODEL_DSO2090:
535 case MODEL_DSO2100: 536 case MODEL_DSO2100:
536 this->samplerateChannelMax = 50e6; 537 this->samplerateChannelMax = 50e6;
  538 + this->samplerateFastMax = 100e6;
537 break; 539 break;
538 540
539 case MODEL_DSO2150: 541 case MODEL_DSO2150:
540 - this->samplerateChannelMax = 75e6; 542 + this->samplerateChannelMax = 50e6;
  543 + this->samplerateFastMax = 150e6;
541 break; 544 break;
542 545
543 default: 546 default:
544 this->samplerateChannelMax = 125e6; 547 this->samplerateChannelMax = 125e6;
  548 + this->samplerateFastMax = 250e6;
545 break; 549 break;
546 } 550 }
547 this->samplerateMax = this->samplerateChannelMax; 551 this->samplerateMax = this->samplerateChannelMax;
@@ -592,7 +596,7 @@ namespace Hantek { @@ -592,7 +596,7 @@ namespace Hantek {
592 this->samplerateMax = this->samplerateChannelMax; 596 this->samplerateMax = this->samplerateChannelMax;
593 if((this->commandVersion == 0) ? (commandSetTriggerAndSamplerate->getUsedChannels() != USED_CH1CH2) : (commandSetTrigger5200->getUsedChannels() != EUSED_CH1CH2)) { 597 if((this->commandVersion == 0) ? (commandSetTriggerAndSamplerate->getUsedChannels() != USED_CH1CH2) : (commandSetTrigger5200->getUsedChannels() != EUSED_CH1CH2)) {
594 fastRate = true; 598 fastRate = true;
595 - this->samplerateMax *= HANTEK_CHANNELS; 599 + this->samplerateMax = this->samplerateFastMax;
596 } 600 }
597 601
598 // The maximum sample rate depends on the buffer size 602 // The maximum sample rate depends on the buffer size
openhantek/src/hantek/control.h
@@ -89,6 +89,7 @@ namespace Hantek { @@ -89,6 +89,7 @@ namespace Hantek {
89 unsigned long int samplerateDivider; ///< The samplerate divider 89 unsigned long int samplerateDivider; ///< The samplerate divider
90 unsigned long int samplerateMax; ///< The maximum sample rate for the current setup 90 unsigned long int samplerateMax; ///< The maximum sample rate for the current setup
91 unsigned long int samplerateChannelMax; ///< The maximum sample rate for a single channel 91 unsigned long int samplerateChannelMax; ///< The maximum sample rate for a single channel
  92 + unsigned long int samplerateFastMax; ///< The maximum sample rate for fast rate mode
92 Gain gain[HANTEK_CHANNELS]; ///< The gain id 93 Gain gain[HANTEK_CHANNELS]; ///< The gain id
93 double offset[HANTEK_CHANNELS]; ///< The current screen offset for each channel 94 double offset[HANTEK_CHANNELS]; ///< The current screen offset for each channel
94 double offsetReal[HANTEK_CHANNELS]; ///< The real offset for each channel (Due to quantization) 95 double offsetReal[HANTEK_CHANNELS]; ///< The real offset for each channel (Due to quantization)