MCPcopy Index your code
hub / github.com/DreamSourceLab/DSView / set_value

Method set_value

DSView/pv/dialogs/calibration.cpp:252–275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

250}
251
252void Calibration::set_value(int value)
253{
254 QSlider* sc = dynamic_cast<QSlider *>(sender());
255
256 for (const GSList *l = _device_agent->get_channels(); l; l = l->next) {
257 sr_channel *const probe = (sr_channel*)l->data;
258 assert(probe);
259 if (sc->objectName() == VGAIN+probe->index) {
260 uint64_t vgain_default;
261 if (_device_agent->get_config_uint64(SR_CONF_PROBE_VGAIN_DEFAULT, vgain_default, probe))
262 {
263 _device_agent->set_config_uint64(SR_CONF_PROBE_VGAIN, value+vgain_default, probe);
264 }
265 break;
266 }
267 else if (sc->objectName() == VOFF+probe->index) {
268 _device_agent->set_config_uint16(SR_CONF_PROBE_PREOFF, value, probe);
269 break;
270 } else if (sc->objectName() == VCOMB+probe->index) {
271 _device_agent->set_config_int16(SR_CONF_PROBE_COMB_COMP, value, probe);
272 break;
273 }
274 }
275}
276
277void Calibration::on_save()
278{

Callers

nothing calls this directly

Calls 5

get_channelsMethod · 0.80
get_config_uint64Method · 0.80
set_config_uint64Method · 0.80
set_config_uint16Method · 0.80
set_config_int16Method · 0.80

Tested by

no test coverage detected