Subversion Repositories Projects

Rev

Rev 954 | Rev 1437 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 954 Rev 955
Line 108... Line 108...
108
    // really dirty way to get the RSSI out of the display
108
    // really dirty way to get the RSSI out of the display
109
#ifdef ACT_RSSI_FROM_LCD
109
#ifdef ACT_RSSI_FROM_LCD
110
#define REQUEST_FC_LCD_8 "#al?===Dc\r"
110
#define REQUEST_FC_LCD_8 "#al?===Dc\r"
111
    usart1_request_blocking('L', PSTR(REQUEST_FC_LCD_8));
111
    usart1_request_blocking('L', PSTR(REQUEST_FC_LCD_8));
112
    char* str = ((char*)pRxData) + 2;
112
    char* str = ((char*)pRxData) + 2;
-
 
113
 
113
    /*
114
/*
114
                write_ascii_string_len(2, 5, str, 20);
115
                write_ascii_string_len(2, 5, str, 20);
115
                write_ascii_string_len(2, 6, str + 20, 20);
116
                write_ascii_string_len(2, 6, str + 20, 20);
116
                write_ascii_string_len(2, 7, str + 40, 20);
117
                write_ascii_string_len(2, 7, str + 40, 20);
117
                write_ascii_string_len(2, 8, str + 60, 20);
118
                write_ascii_string_len(2, 8, str + 60, 20);
118
     */
119
*/
-
 
120
   
119
    uint8_t rssi_index = 30; // middle of 2nd line
121
    uint8_t rssi_index = 30; // middle of 2nd line
120
    while (str[rssi_index] == 0) rssi_index++;
122
    while (str[rssi_index] == ' ') rssi_index++;
-
 
123
    str += rssi_index;
121
    int lcd_rssi = atoi(str[rssi_index]);
124
    int lcd_rssi = atoi(str);
122
    write_ndigit_number_u(7, top_line, lcd_rssi, 3, 0);
125
    write_ndigit_number_u(7, top_line, lcd_rssi, 3, 0);
123
    rc_quality = lcd_rssi;
126
    rc_quality = lcd_rssi;
Line 124... Line 127...
124
 
127