Readjust dynamic range after first sync

This commit is contained in:
Sebastian 2018-01-04 15:42:36 +01:00 committed by Sebastian
parent 0e5aeb849f
commit 6cbe19ba60
2 changed files with 12 additions and 0 deletions

View File

@ -84,6 +84,7 @@ namespace gr
d_synchronize_opt (sync), d_synchronize_opt (sync),
d_flip (flip), d_flip (flip),
d_history_length (40), d_history_length (40),
d_has_sync (false),
d_current_x (0), d_current_x (0),
d_current_y (0), d_current_y (0),
d_num_images (0), d_num_images (0),
@ -249,9 +250,19 @@ namespace gr
if(d_synchronize_opt) { if(d_synchronize_opt) {
if(is_marker(i, in) == noaa_apt_sync_marker::SYNC_A) { if(is_marker(i, in) == noaa_apt_sync_marker::SYNC_A) {
skip_to(39, i, in); skip_to(39, i, in);
if(!d_has_sync) {
f_max_level = 0.0;
f_min_level = 1.0;
d_has_sync = true;
}
} }
else if(is_marker(i, in) == noaa_apt_sync_marker::SYNC_B) { else if(is_marker(i, in) == noaa_apt_sync_marker::SYNC_B) {
skip_to(d_width / 2 + 39, i, in); skip_to(d_width / 2 + 39, i, in);
if(!d_has_sync) {
f_max_level = 0.0;
f_min_level = 1.0;
d_has_sync = true;
}
} }
} }

View File

@ -44,6 +44,7 @@ namespace gr
bool d_synchronize_opt; bool d_synchronize_opt;
bool d_flip; bool d_flip;
size_t d_history_length; size_t d_history_length;
bool d_has_sync;
png::image<png::gray_pixel> d_full_image; png::image<png::gray_pixel> d_full_image;
png::image<png::gray_pixel> d_left_image; png::image<png::gray_pixel> d_left_image;