diff options
author | Johnathan Corgan <jcorgan@corganenterprises.com> | 2010-07-05 10:43:40 -0700 |
---|---|---|
committer | Johnathan Corgan <jcorgan@corganenterprises.com> | 2010-07-05 10:43:40 -0700 |
commit | 41c222c05eb0e3f36cf5a0e328eead58e77e3a8b (patch) | |
tree | c8d25fdcd4be89ff24cfd2e5b1a7562ae7d8c7dc /gnuradio-core/src/lib | |
parent | 8a4ef7ce3c1028454a357b38b1ddb0af0b54d604 (diff) | |
parent | dc79a11cb809b33f397603e7641b155120be9ee8 (diff) |
Merge branch 'patches/marcus/stripchart'
Conflicts:
gr-wxgui/src/python/scope_window.py
* Adds new scope window trigger, TRIG_MODE_STRIPCHART
* Allows config file selection of whether background window sinks still run
* Allows config file selection of default trigger mode
* Allows config file selection of default waterfall sink color mode
[wxgui]
#Setting this to true prevents the window sinks from stopping when they
#are not displayed, as when they are in a notebook with a hidden tab.
run_always = False
# Default scope trigger mode.
#
# 0 = Freerun
# 1 = Auto (default)
# 2 = Normal
# 3 = Stripchart
trig_mode = 1
# Default waterfall sink color mode. Valid choices are 'rgb1', 'rbg2',
# 'rgb3', or 'gray'
waterfall_color = rgb1
Diffstat (limited to 'gnuradio-core/src/lib')
-rw-r--r-- | gnuradio-core/src/lib/io/gr_oscope_guts.cc | 69 | ||||
-rw-r--r-- | gnuradio-core/src/lib/io/gr_trigger_mode.h | 1 |
2 files changed, 43 insertions, 27 deletions
diff --git a/gnuradio-core/src/lib/io/gr_oscope_guts.cc b/gnuradio-core/src/lib/io/gr_oscope_guts.cc index 80f78240d3..ce7feca13c 100644 --- a/gnuradio-core/src/lib/io/gr_oscope_guts.cc +++ b/gnuradio-core/src/lib/io/gr_oscope_guts.cc @@ -104,34 +104,49 @@ gr_oscope_guts::process_sample (const float *channel_data) d_decimator_count = d_decimator_count_init; - for (int i = 0; i < d_nchannels; i++) - d_buffer[i][d_obi] = channel_data[i]; // copy data into buffer - - switch (d_state){ - case HOLD_OFF: - d_hold_off_count--; - if (d_hold_off_count <= 0) - enter_look_for_trigger (); - break; - - case LOOK_FOR_TRIGGER: - if (found_trigger ()) - enter_post_trigger (); - break; - - case POST_TRIGGER: - d_post_trigger_count--; - if (d_post_trigger_count <= 0){ - write_output_records (); - enter_hold_off (); - } - break; - - default: - assert (0); + if (d_trigger_mode != gr_TRIG_MODE_STRIPCHART) + { + for (int i = 0; i < d_nchannels; i++) + d_buffer[i][d_obi] = channel_data[i]; // copy data into buffer + + switch (d_state){ + case HOLD_OFF: + d_hold_off_count--; + if (d_hold_off_count <= 0) + enter_look_for_trigger (); + break; + + case LOOK_FOR_TRIGGER: + if (found_trigger ()) + enter_post_trigger (); + break; + + case POST_TRIGGER: + d_post_trigger_count--; + if (d_post_trigger_count <= 0){ + write_output_records (); + enter_hold_off (); + } + break; + + default: + assert (0); + } + + d_obi = incr_bi (d_obi); + } + else + { + for (int i = 0; i < d_nchannels; i++) + { + for (int j = OUTPUT_RECORD_SIZE-1; j >= 0; j--) + { + d_buffer[i][j] = d_buffer[i][j-1]; + } + d_buffer[i][0] = channel_data[i]; + } + write_output_records(); } - - d_obi = incr_bi (d_obi); } /* diff --git a/gnuradio-core/src/lib/io/gr_trigger_mode.h b/gnuradio-core/src/lib/io/gr_trigger_mode.h index 63f6b1c987..8e1222856d 100644 --- a/gnuradio-core/src/lib/io/gr_trigger_mode.h +++ b/gnuradio-core/src/lib/io/gr_trigger_mode.h @@ -27,6 +27,7 @@ enum gr_trigger_mode { gr_TRIG_MODE_FREE, gr_TRIG_MODE_AUTO, gr_TRIG_MODE_NORM, + gr_TRIG_MODE_STRIPCHART, }; enum gr_trigger_slope { |