Skip to content

Commit a534477

Browse files
-WP arrow fix for latest arduplane
-Alt error fix on tune panel
1 parent 276a3f4 commit a534477

File tree

2 files changed

+16400
-13
lines changed

2 files changed

+16400
-13
lines changed

MinimOSD_Extra_Plane_Pre_release_Beta/OSD_Panels.ino

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ void startPanels(){
1010
void panLogo(){
1111
osd.setPanel(5, 5);
1212
osd.openPanel();
13-
osd.printf_P(PSTR("MinimOSD-Extra 2.4|Plane r795"));
13+
osd.printf_P(PSTR("MinimOSD-Extra 2.4|Plane r798"));
1414
osd.closePanel();
1515
}
1616

@@ -289,7 +289,7 @@ void panRSSI(int first_col, int first_line){
289289
}
290290
if(rssiraw_on == 1) rssi = (int16_t)osd_rssi;
291291
if(rssiraw_on == 9) rssi = chan8_raw;
292-
osd.printf("%c%3i%c", 0x09, rssi, 0x25);
292+
osd.printf("%c%4i%c", 0x09, rssi, 0x25);
293293
osd.closePanel();
294294
}
295295

@@ -512,7 +512,7 @@ void panOff(){
512512
osd.setPanel(first_col, first_line);
513513
osd.openPanel();
514514

515-
osd.printf("%c%3.0f%c%c|%c%3.0f%c%c", 0xb0, (alt_error * converth), high, 0x20, 0xb1, ((aspd_error / 100.0) * converts), spe, 0x20);
515+
osd.printf("%c%3.0f%c%c", 0xb0, (alt_error * converth * -1), high, 0x20, 0xb1, ((aspd_error / 100.0) * converts), spe, 0x20);
516516

517517
osd.closePanel();
518518
}
@@ -1042,22 +1042,24 @@ void panRose(int first_col, int first_line){
10421042
void panWPDis(int first_col, int first_line){
10431043
osd.setPanel(first_col, first_line);
10441044
osd.openPanel();
1045+
1046+
if (wp_target_bearing > 0){
1047+
wp_target_bearing_rotate_int = round((wp_target_bearing - osd_heading)/360 *16.0) + 1;
1048+
}else if (wp_target_bearing < 0){
1049+
wp_target_bearing_rotate_int = round(((360 + wp_target_bearing) - osd_heading)/360 *16.0) + 1;
1050+
}
1051+
if (wp_target_bearing_rotate_int < 0) wp_target_bearing_rotate_int += 16;
1052+
if (wp_target_bearing_rotate_int == 0) wp_target_bearing_rotate_int = 16;
10451053

1046-
wp_target_bearing_rotate_int = round(((float)wp_target_bearing - osd_heading)/360.0 * 16.0) + 1; //Convert to int 0-16
1047-
if(wp_target_bearing_rotate_int < 1 ) wp_target_bearing_rotate_int += 16; //normalize
1048-
// else if(wp_target_bearing_rotate_int == 0 ) wp_target_bearing_rotate_int = 16; //normalize
1049-
else if(wp_target_bearing_rotate_int > 16 ) wp_target_bearing_rotate_int -= 16; //normalize
1050-
if (xtrack_error > 999) xtrack_error = 999;
1051-
else if (xtrack_error < -999) xtrack_error = -999;
10521054

10531055
osd.printf("%c%c%2i%c%4.0f%c|",0x57, 0x70, wp_number,0x0,(double)((float)(wp_dist) * converth),high);
10541056
showArrow((uint8_t)wp_target_bearing_rotate_int,0);
10551057

1056-
if (osd_mode == 10 || osd_mode == 15 || osd_mode == 7){
1058+
// if (osd_mode == 10 || osd_mode == 15 || osd_mode == 7){
10571059
osd.printf("%c%c%c%4.0f%c", 0x20, 0x58, 0x65, (xtrack_error* converth), high);
1058-
}else{
1059-
osd.printf_P(PSTR("\x20\x20\x20\x20\x20\x20\x20\x20"));
1060-
}
1060+
// }else{
1061+
// osd.printf_P(PSTR("\x20\x20\x20\x20\x20\x20\x20\x20"));
1062+
// }
10611063
osd.closePanel();
10621064
}
10631065

0 commit comments

Comments
 (0)