| 486 | } |
| 487 | |
| 488 | QPointF MathTrace::get_point(uint64_t index, float &value, bool &out_Error) |
| 489 | { |
| 490 | QPointF pt = QPointF(0, 0); |
| 491 | |
| 492 | out_Error = false; |
| 493 | |
| 494 | if (index >= _math_stack->get_sample_num()){ |
| 495 | out_Error = true; |
| 496 | return pt; |
| 497 | } |
| 498 | |
| 499 | const float top = get_view_rect().top(); |
| 500 | const float bottom = get_view_rect().bottom(); |
| 501 | const float zeroP = _zero_vrate * get_view_rect().height() + top; |
| 502 | const float x = _view->index2pixel(index); |
| 503 | |
| 504 | float v = *_math_stack->get_math(index); |
| 505 | value = v * get_vDialfactor(); |
| 506 | float y = min(max(top, zeroP - (v * _scale)), bottom); |
| 507 | pt = QPointF(x, y); |
| 508 | return pt; |
| 509 | } |
| 510 | |
| 511 | QString MathTrace::get_voltage(double v, int p) |
| 512 | { |
nothing calls this directly
no test coverage detected