X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=gnuradio-core%2Fsrc%2Flib%2Fio%2Fgr_oscope_guts.cc;fp=gnuradio-core%2Fsrc%2Flib%2Fio%2Fgr_oscope_guts.cc;h=ce7feca13c49178437f99c3fccbe6cb831847ef9;hb=2924c0e740bbb9106bfed602345daaee5606d62a;hp=80f78240d3a052ec942f80ef4972da8756084f2b;hpb=94d315e556805fb75784964499472977664809c4;p=debian%2Fgnuradio diff --git a/gnuradio-core/src/lib/io/gr_oscope_guts.cc b/gnuradio-core/src/lib/io/gr_oscope_guts.cc index 80f78240..ce7feca1 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); } /*