aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan BrĂ¼ns <stefan.bruens@rwth-aachen.de>2017-01-14 20:56:08 +0100
committerUwe Hermann <uwe@hermann-uwe.de>2017-01-21 15:08:21 +0100
commit59b9c3290aef7dfdc58afd0a4db8b347e0878c91 (patch)
tree5ef9c9c99b02f3cd5458fde28d09dd51f1e23e99
parentd8b65ef66112f2c5dccdbe668b05e6856c00ac3d (diff)
yokogawa-dlm: Mostly fix dumping of current timebase
sr_period_string takes the frequency as its argument, i.e. the reciprocal of the timebase. Obviously this will not work for frequencies less than 1Hz / timebases greater than 1 second, but at least is correct for all other available timebases.
-rw-r--r--src/hardware/yokogawa-dlm/protocol.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hardware/yokogawa-dlm/protocol.c b/src/hardware/yokogawa-dlm/protocol.c
index bd2f33f..0886689 100644
--- a/src/hardware/yokogawa-dlm/protocol.c
+++ b/src/hardware/yokogawa-dlm/protocol.c
@@ -305,8 +305,8 @@ static void scope_state_dump(const struct scope_config *config,
state->pod_states[i] ? "On" : "Off");
}
- tmp = sr_period_string(dlm_timebases[state->timebase][0] *
- dlm_timebases[state->timebase][1]);
+ tmp = sr_period_string(dlm_timebases[state->timebase][1] /
+ dlm_timebases[state->timebase][0]);
sr_info("Current timebase: %s", tmp);
g_free(tmp);