fix typo in argument parsing
This commit is contained in:
parent
281b18b6ca
commit
638afadf11
@ -40,7 +40,7 @@ PS2000_TIME_UNITS parse_units(char* unit) {
|
||||
if (strcmp(unit, "ps") == 0)
|
||||
return PS2000_PS;
|
||||
if (strcmp(unit, "ns") == 0)
|
||||
return PS2000_US;
|
||||
return PS2000_NS;
|
||||
if (strcmp(unit, "us") == 0)
|
||||
return PS2000_US;
|
||||
if (strcmp(unit, "ms") == 0)
|
||||
|
@ -31,6 +31,7 @@ void get_overview_buffers(int16_t** overviewBuffers, int16_t overflow, uint32_t
|
||||
buffer[(i * 2) + 1] = overviewBuffers[2][i] / (float)INT16_MAX;
|
||||
}
|
||||
|
||||
// fprintf(stderr, "%u\n", nValues);
|
||||
fwrite(buffer, sizeof(float), nValues * 2, stdout);
|
||||
} else {
|
||||
for (uint32_t i = 0; i < nValues; i++) {
|
||||
@ -92,6 +93,7 @@ int main(int argc, char** argv) {
|
||||
buffer = (float*)malloc(sizeof(float) * (cfg->max_buffersize) * (cfg->iq_mode ? 2 : 1));
|
||||
|
||||
// start data capture without aggregation
|
||||
fprintf(stderr, "sample_interval=%u, time_units=%u, buffer_size=%u, max_buffer_size=%u\n", cfg->sample_interval, cfg->time_units, cfg->buffersize, cfg->max_buffersize);
|
||||
if (ps2000_run_streaming_ns(unit, cfg->sample_interval, cfg->time_units, cfg->buffersize, false, 1, cfg->max_buffersize) == 0) {
|
||||
fprintf(stderr, "run_streaming_ns failed!\n");
|
||||
cleanup(unit);
|
||||
|
Loading…
Reference in New Issue
Block a user