@@ -329,7 +329,7 @@ void osdDrawArtificialHorizonLine(displayCanvas_t *canvas, float pitchAngle, flo
329329 displayCanvasContextPop (canvas );
330330}
331331
332- static bool osdCanvasDrawArtificialHorizonWidget (displayPort_t * display , displayCanvas_t * canvas , const osdDrawPoint_t * p , float pitchAngle , float rollAngle , bool isInverted )
332+ static bool osdCanvasDrawArtificialHorizonWidget (displayPort_t * display , displayCanvas_t * canvas , const osdDrawPoint_t * p , float pitchAngle , float rollAngle )
333333{
334334 UNUSED (display );
335335 UNUSED (p );
@@ -346,10 +346,7 @@ static bool osdCanvasDrawArtificialHorizonWidget(displayPort_t *display, display
346346 int ahiX = (canvas -> width - ahiWidth ) / 2 ;
347347 int ahiHeight = osdConfig ()-> ahi_height ;
348348 int ahiY = ((canvas -> height - ahiHeight ) / 2 );
349- if (isInverted )
350- ahiY -= osdConfig ()-> ahi_vertical_offset ;
351- else
352- ahiY += osdConfig ()-> ahi_vertical_offset ;
349+ ahiY += osdConfig ()-> ahi_vertical_offset ;
353350
354351 if (ahiY < 0 ) {
355352 ahiY = 0 ;
@@ -402,7 +399,7 @@ static bool osdCanvasDrawArtificialHorizonWidget(displayPort_t *display, display
402399 return false;
403400}
404401
405- void osdCanvasDrawArtificialHorizon (displayPort_t * display , displayCanvas_t * canvas , const osdDrawPoint_t * p , float pitchAngle , float rollAngle , bool isInverted )
402+ void osdCanvasDrawArtificialHorizon (displayPort_t * display , displayCanvas_t * canvas , const osdDrawPoint_t * p , float pitchAngle , float rollAngle )
406403{
407404 UNUSED (display );
408405 UNUSED (p );
@@ -417,7 +414,7 @@ void osdCanvasDrawArtificialHorizon(displayPort_t *display, displayCanvas_t *can
417414 float totalError = fabsf (prevPitchAngle - pitchAngle ) + fabsf (prevRollAngle - rollAngle );
418415 if ((now > nextDrawMinMs && totalError > 0.05f )|| now > nextDrawMaxMs ) {
419416
420- if (!osdCanvasDrawArtificialHorizonWidget (display , canvas , p , pitchAngle , rollAngle , isInverted )) {
417+ if (!osdCanvasDrawArtificialHorizonWidget (display , canvas , p , pitchAngle , rollAngle )) {
421418 switch ((osd_ahi_style_e )osdConfig ()-> ahi_style ) {
422419 case OSD_AHI_STYLE_DEFAULT :
423420 {
0 commit comments