| 250 | } |
| 251 | |
| 252 | void 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 | |
| 277 | void Calibration::on_save() |
| 278 | { |
nothing calls this directly
no test coverage detected