| 1468 | } |
| 1469 | |
| 1470 | QPointF DsoSignal::get_point(uint64_t index, float &value) |
| 1471 | { |
| 1472 | QPointF pt = QPointF(-1, -1); |
| 1473 | |
| 1474 | if (!enabled()) |
| 1475 | return pt; |
| 1476 | |
| 1477 | if (_data->empty()) |
| 1478 | return pt; |
| 1479 | |
| 1480 | if (index >= _data->get_sample_count()) |
| 1481 | return pt; |
| 1482 | |
| 1483 | value = *_data->get_samples(index, index, get_index()); |
| 1484 | const float top = get_view_rect().top(); |
| 1485 | const float bottom = get_view_rect().bottom(); |
| 1486 | const int hw_offset = get_hw_offset(); |
| 1487 | const float x = _view->index2pixel(index); |
| 1488 | const float y = min(max(top, get_zero_vpos() + (value - hw_offset)* _scale), bottom); |
| 1489 | pt = QPointF(x, y); |
| 1490 | |
| 1491 | return pt; |
| 1492 | } |
| 1493 | |
| 1494 | double DsoSignal::get_voltage(uint64_t index) |
| 1495 | { |
nothing calls this directly
no test coverage detected