fix: Unable to set the trig position for dscope by UI

This commit is contained in:
dreamsourcelabTAI
2023-09-27 10:19:54 +08:00
parent b5be7b4aaf
commit a7119873d8
2 changed files with 14 additions and 6 deletions
+10 -2
View File
@@ -486,11 +486,16 @@ void View::receive_end()
_time_viewport->unshow_wait_trigger();
}
void View::receive_trigger(quint64 trig_pos1)
{
(void)trig_pos1;
uint64_t trig_pos = _session->get_trigger_pos();
set_trig_cursor_posistion(trig_pos);
}
void View::set_trig_cursor_posistion(uint64_t trig_pos)
{
const double time = trig_pos * 1.0 / _session->cur_snap_samplerate();
_trig_cursor->set_index(trig_pos);
@@ -512,7 +517,10 @@ void View::receive_trigger(quint64 trig_pos1)
void View::set_trig_pos(int percent)
{
uint64_t index = _session->cur_samplelimits() * percent / 100;
receive_trigger(index);
if (_session->have_view_data() == false){
set_trig_cursor_posistion(index);
}
}
void View::set_search_pos(uint64_t search_pos, bool hit)
+4 -4
View File
@@ -396,10 +396,7 @@ private slots:
void v_scroll_value_changed(int value);
void marker_time_changed();
void on_traces_moved();
void on_traces_moved();
void set_trig_pos(int percent);
// calibration for oscilloscope
@@ -410,6 +407,9 @@ private slots:
void splitterMoved(int pos, int index);
private:
void set_trig_cursor_posistion(uint64_t percent);
public:
void show_wait_trigger();
void set_device();