Bug 1068 - Channel enable state should be read from the device on startup
Summary: Channel enable state should be read from the device on startup
Status: RESOLVED DUPLICATE of bug 883
Alias: None
Product: libsigrok
Classification: Unclassified
Component: Driver: hameg-hmo (show other bugs)
Version: unreleased development snapshot
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-02 17:04 CET by Stefan Brüns
Modified: 2017-12-02 18:25 CET (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Brüns 2017-12-02 17:04:14 CET
Currently, all channels are enabled on startup, although libsigrok has correctly retrieved the Channel state from the device:

sr: [03:57.579263] hameg-hmo: Fetching finished.
sr: [03:57.579285] hameg-hmo: State of analog channel 1 -> On : DCL (coupling) 200 mV (vdiv) -1.92e+00 (offset)
sr: [03:57.579314] hameg-hmo: State of analog channel 2 -> On : DCL (coupling) 1 V (vdiv) 1.10e+00 (offset)
sr: [03:57.579330] hameg-hmo: State of digital channel 0 -> Off
sr: [03:57.579341] hameg-hmo: State of digital channel 1 -> Off
sr: [03:57.579350] hameg-hmo: State of digital channel 2 -> Off
sr: [03:57.579359] hameg-hmo: State of digital channel 3 -> Off
sr: [03:57.579369] hameg-hmo: State of digital channel 4 -> Off
sr: [03:57.579379] hameg-hmo: State of digital channel 5 -> Off
sr: [03:57.579389] hameg-hmo: State of digital channel 6 -> Off
sr: [03:57.579398] hameg-hmo: State of digital channel 7 -> Off
sr: [03:57.579407] hameg-hmo: State of digital POD 0 -> Off

This should be reflected in the channel configuration dialog.

All settings from the device configuration dialog (e.g. VDiv, TB) are correctly initialized.
Comment 1 Soeren Apel 2017-12-02 17:24:22 CET
This is a driver bug.

Comparing

https://sigrok.org/gitweb/?p=libsigrok.git;a=blob;f=src/hardware/hameg-hmo/protocol.c#l382

and

https://sigrok.org/gitweb/?p=libsigrok.git;a=blob;f=src/hardware/yokogawa-dlm/protocol.c#l383

shows that while hameg-hmo does update the internal state struct, it does not update libsigrok's internal channel state. yokogawa-dlm does it, so it's pretty much a copy'n'paste.
Comment 2 Soeren Apel 2017-12-02 18:25:44 CET

*** This bug has been marked as a duplicate of bug 883 ***