From 9860878b5c4646218ff9d7e8ac29873de994140e Mon Sep 17 00:00:00 2001 From: vicdzen Date: Fri, 15 Jan 2016 18:56:29 +0200 Subject: [PATCH 1/3] Update rx5808_pro_osd.ino Flickering of Band , active channel and bottom band-channel numbering removed on Manual screen. Now it is nice and clean :) --- rx5808_pro_osd/rx5808_pro_osd.ino | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/rx5808_pro_osd/rx5808_pro_osd.ino b/rx5808_pro_osd/rx5808_pro_osd.ino index da7afa5..cc18bbc 100644 --- a/rx5808_pro_osd/rx5808_pro_osd.ino +++ b/rx5808_pro_osd/rx5808_pro_osd.ino @@ -1845,22 +1845,24 @@ void spectrum_dump (uint8_t height) void screen_manual_data(uint8_t channelIndex) { - // clear last line - osd_print(BAND_SCANNER_SPECTRUM_X_MIN,4,"\x02 CHAN: ? \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17\x02"); - // set correct values by replace some characters (simple code) + // Initial string + uint8_t chan_str[32] = "\x02 CHAN: ? \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17\x02"; // BAND - osd_print_char(BAND_SCANNER_SPECTRUM_X_MIN+8,4,pgm_read_byte_near(bandNames + channelIndex)); + chan_str[8] = pgm_read_byte_near(bandNames + channelIndex); // ACTIVE CHANNEL uint8_t active_channel = channelIndex%CHANNEL_BAND_SIZE; // get channel inside band char active=0x18 + active_channel; - osd_print_char(BAND_SCANNER_SPECTRUM_X_MIN+11+(2*active_channel),4,active); + chan_str[11 + 2*active_channel] = active; + //Print whole string + osd_print(BAND_SCANNER_SPECTRUM_X_MIN, 4, (const char*)chan_str); // FREQUENCY osd_print_int(BAND_SCANNER_SPECTRUM_X_MIN+8,5,pgm_read_word_near(channelFreqTable + channelIndex)); // add marker for all channel per active band // set available channels marker // clear symbol line - osd_print(BAND_SCANNER_SPECTRUM_X_MIN,SCREEN_Y_MAX," "); + //osd_print(BAND_SCANNER_SPECTRUM_X_MIN,SCREEN_Y_MAX," "); uint8_t loop=0; + for(loop=0;loop<32;loop++) chan_str[loop] = 0x20; for(loop=0;loop<8;loop++) { uint8_t band_number=pgm_read_byte_near(bandNumber + channelIndex); @@ -1872,8 +1874,9 @@ void screen_manual_data(uint8_t channelIndex) uint8_t x_pos_54= (frequency_delta*(INTEGER_GAIN+ROUND_CORRECTION)) / frequency_per_char; uint8_t x=((x_pos_54)/2); // final down scale to single character // print marker - osd_print_char(BAND_SCANNER_SPECTRUM_X_MIN+x,SCREEN_Y_MAX,pgm_read_byte_near(channelSymbol + channel)); + chan_str[x] = pgm_read_byte_near(channelSymbol + channel); } + osd_print(BAND_SCANNER_SPECTRUM_X_MIN,SCREEN_Y_MAX, (const char*)chan_str); } /////////////////////////////////////// From d233090c5586fc7c7342b0b0fd9ae614dd3a76c6 Mon Sep 17 00:00:00 2001 From: vicdzen Date: Fri, 15 Jan 2016 18:59:03 +0200 Subject: [PATCH 2/3] Update rx5808_pro_osd.ino --- rx5808_pro_osd/rx5808_pro_osd.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rx5808_pro_osd/rx5808_pro_osd.ino b/rx5808_pro_osd/rx5808_pro_osd.ino index cc18bbc..ccf3fa3 100644 --- a/rx5808_pro_osd/rx5808_pro_osd.ino +++ b/rx5808_pro_osd/rx5808_pro_osd.ino @@ -1922,7 +1922,7 @@ void screen_mode_selection(void) const static char P_text_4[] PROGMEM = "\x02 EXIT \x02"; const static char P_text_5[] PROGMEM = "\x02 AUTO SEARCH \x02"; const static char P_text_6[] PROGMEM = "\x02 BAND SCANNER \x02"; - const static char P_text_7[] PROGMEM = "\x02 MANUEL MODE \x02"; + const static char P_text_7[] PROGMEM = "\x02 MANUAL MODE \x02"; const static char P_text_8[] PROGMEM = "\x02 SETUP \x02"; const static char P_text_9[] PROGMEM = "\x05\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x06"; From 8064607222f893cc55c017a447497f55ffbee099 Mon Sep 17 00:00:00 2001 From: vicdzen Date: Fri, 15 Jan 2016 19:01:55 +0200 Subject: [PATCH 3/3] Update rx5808_pro_osd.ino Cleaned up a bit --- rx5808_pro_osd/rx5808_pro_osd.ino | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/rx5808_pro_osd/rx5808_pro_osd.ino b/rx5808_pro_osd/rx5808_pro_osd.ino index ccf3fa3..2f5dc99 100644 --- a/rx5808_pro_osd/rx5808_pro_osd.ino +++ b/rx5808_pro_osd/rx5808_pro_osd.ino @@ -1859,10 +1859,8 @@ void screen_manual_data(uint8_t channelIndex) osd_print_int(BAND_SCANNER_SPECTRUM_X_MIN+8,5,pgm_read_word_near(channelFreqTable + channelIndex)); // add marker for all channel per active band // set available channels marker - // clear symbol line - //osd_print(BAND_SCANNER_SPECTRUM_X_MIN,SCREEN_Y_MAX," "); uint8_t loop=0; - for(loop=0;loop<32;loop++) chan_str[loop] = 0x20; + for(loop=0;loop<32;loop++) chan_str[loop] = 0x20; // clear symbol line for(loop=0;loop<8;loop++) { uint8_t band_number=pgm_read_byte_near(bandNumber + channelIndex); @@ -1873,9 +1871,9 @@ void screen_manual_data(uint8_t channelIndex) uint16_t frequency_per_char=((BAND_SCANNER_FREQ_MAX-BAND_SCANNER_FREQ_MIN)*INTEGER_GAIN)/((BAND_SCANNER_SPECTRUM_X_MAX-1)*2); uint8_t x_pos_54= (frequency_delta*(INTEGER_GAIN+ROUND_CORRECTION)) / frequency_per_char; uint8_t x=((x_pos_54)/2); // final down scale to single character - // print marker chan_str[x] = pgm_read_byte_near(channelSymbol + channel); } + //Print complete string with everything osd_print(BAND_SCANNER_SPECTRUM_X_MIN,SCREEN_Y_MAX, (const char*)chan_str); }