@@ -1578,11 +1578,11 @@ static void printGeozones(uint8_t dumpMask, const geoZoneConfig_t *geoZone, cons
15781578 && geoZone [i ].fenceAction == defaultGeoZone -> fenceAction
15791579 && geoZone [i ].vertexCount == defaultGeoZone -> vertexCount ;
15801580
1581- cliDefaultPrintLinef (dumpMask , equalsDefault , format , defaultGeoZone [i ].shape , defaultGeoZone [i ].type , defaultGeoZone [i ].minAltitude , defaultGeoZone [i ].maxAltitude , defaultGeoZone [i ].isSealevelRef , defaultGeoZone [i ].fenceAction , defaultGeoZone [i ].vertexCount );
1581+ cliDefaultPrintLinef (dumpMask , equalsDefault , format , defaultGeoZone [i ].shape , defaultGeoZone [i ].type , defaultGeoZone [i ].minAltitude , defaultGeoZone [i ].maxAltitude , defaultGeoZone [i ].isSealevelRef , defaultGeoZone [i ].fenceAction , defaultGeoZone [i ].vertexCount );
15821582 }
1583- cliDumpPrintLinef (dumpMask , equalsDefault , format , i , geoZone [i ].shape , geoZone [i ].type , geoZone [i ].minAltitude , geoZone [i ].maxAltitude , geoZone [i ].isSealevelRef , geoZone [i ].fenceAction , geoZone [i ].vertexCount );
1583+ cliDumpPrintLinef (dumpMask , equalsDefault , format , i , geoZone [i ].shape , geoZone [i ].type , geoZone [i ].minAltitude , geoZone [i ].maxAltitude , geoZone [i ].isSealevelRef , geoZone [i ].fenceAction , geoZone [i ].vertexCount );
15841584 }
1585- }
1585+ }
15861586
15871587static void printGeozoneVertices (uint8_t dumpMask , const vertexConfig_t * vertices , const vertexConfig_t * defaultVertices )
15881588{
@@ -1594,11 +1594,11 @@ static void printGeozoneVertices(uint8_t dumpMask, const vertexConfig_t *vertice
15941594 && vertices [i ].lat == defaultVertices -> lat
15951595 && vertices [i ].lon == defaultVertices -> lon
15961596 && vertices [i ].zoneId == defaultVertices -> zoneId ;
1597-
1597+
15981598 cliDefaultPrintLinef (dumpMask , equalsDefault , format , defaultVertices [i ].zoneId , defaultVertices [i ].idx , defaultVertices [i ].lat , defaultVertices [i ].lon );
15991599 }
1600-
1601- cliDumpPrintLinef (dumpMask , equalsDefault , format , vertices [i ].zoneId , vertices [i ].idx , vertices [i ].lat , vertices [i ].lon );
1600+
1601+ cliDumpPrintLinef (dumpMask , equalsDefault , format , vertices [i ].zoneId , vertices [i ].idx , vertices [i ].lat , vertices [i ].lon );
16021602 }
16031603
16041604 if (!defaultVertices ) {
@@ -1608,10 +1608,10 @@ static void printGeozoneVertices(uint8_t dumpMask, const vertexConfig_t *vertice
16081608}
16091609
16101610static void cliGeozone (char * cmdLine )
1611- {
1611+ {
16121612 if (isEmpty (cmdLine )) {
16131613 printGeozones (DUMP_MASTER , geoZonesConfig (0 ), NULL );
1614- } else if (sl_strcasecmp (cmdLine , "vertex" ) == 0 ) {
1614+ } else if (sl_strcasecmp (cmdLine , "vertex" ) == 0 ) {
16151615 printGeozoneVertices (DUMP_MASTER , geoZoneVertices (0 ), NULL );
16161616 } else if (sl_strncasecmp (cmdLine , "vertex reset" , 12 ) == 0 ) {
16171617 const char * ptr = & cmdLine [12 ];
@@ -1648,7 +1648,7 @@ static void cliGeozone(char* cmdLine)
16481648 const char * ptr = cmdLine ;
16491649 uint8_t argumentCount = 1 ;
16501650
1651- if ((ptr = nextArg (ptr ))) {
1651+ if ((ptr = nextArg (ptr ))) {
16521652 zoneId = fastA2I (ptr );
16531653 if (zoneId < 0 ) {
16541654 return ;
@@ -1678,7 +1678,7 @@ static void cliGeozone(char* cmdLine)
16781678 cliShowParseError ();
16791679 return ;
16801680 }
1681-
1681+
16821682 if ((ptr = nextArg (ptr ))) {
16831683 argumentCount ++ ;
16841684 lon = fastA2I (ptr );
@@ -1695,7 +1695,7 @@ static void cliGeozone(char* cmdLine)
16951695 cliShowParseError ();
16961696 return ;
16971697 }
1698-
1698+
16991699 for (uint8_t i = 0 ; i < MAX_VERTICES_IN_CONFIG ; i ++ ) {
17001700 if (geoZoneVertices (i )-> zoneId == zoneId && geoZoneVertices (i )-> idx == vertexZoneIdx ) {
17011701 geoZoneVerticesMutable (i )-> lat = lat ;
@@ -1719,8 +1719,8 @@ static void cliGeozone(char* cmdLine)
17191719 geoZoneVerticesMutable (vertexIdx )-> lat = lat ;
17201720 geoZoneVerticesMutable (vertexIdx )-> lon = lon ;
17211721 geoZoneVerticesMutable (vertexIdx )-> zoneId = zoneId ;
1722- geoZoneVerticesMutable (vertexIdx )-> idx = vertexZoneIdx ;
1723-
1722+ geoZoneVerticesMutable (vertexIdx )-> idx = vertexZoneIdx ;
1723+
17241724 uint8_t totalVertices = geozoneGetUsedVerticesCount ();
17251725 cliPrintLinef ("# %u vertices free (Used %u of %u)" , MAX_VERTICES_IN_CONFIG - totalVertices , totalVertices , MAX_VERTICES_IN_CONFIG );
17261726
@@ -1733,7 +1733,7 @@ static void cliGeozone(char* cmdLine)
17331733 } else {
17341734 geozoneReset (-1 );
17351735 geozoneResetVertices (-1 , -1 );
1736- }
1736+ }
17371737 } else {
17381738 int8_t idx = 0 , isPolygon = 0 , isInclusive = 0 , fenceAction = 0 , seaLevelRef = 0 , vertexCount = 0 ;
17391739 int32_t minAltitude = 0 , maxAltitude = 0 ;
@@ -1745,7 +1745,7 @@ static void cliGeozone(char* cmdLine)
17451745 cliShowArgumentRangeError ("geozone index" , 0 , MAX_GEOZONES_IN_CONFIG - 1 );
17461746 return ;
17471747 }
1748-
1748+
17491749 if ((ptr = nextArg (ptr ))) {
17501750 argumentCount ++ ;
17511751 isPolygon = fastA2I (ptr );
@@ -1787,7 +1787,7 @@ static void cliGeozone(char* cmdLine)
17871787 }
17881788
17891789 if ((ptr = nextArg (ptr ))){
1790- argumentCount ++ ;
1790+ argumentCount ++ ;
17911791 fenceAction = fastA2I (ptr );
17921792 if (fenceAction < 0 || fenceAction > GEOFENCE_ACTION_RTH ) {
17931793 cliShowArgumentRangeError ("fence action" , 0 , GEOFENCE_ACTION_RTH );
@@ -1812,7 +1812,7 @@ static void cliGeozone(char* cmdLine)
18121812
18131813 if ((ptr = nextArg (ptr ))){
18141814 argumentCount ++ ;
1815- }
1815+ }
18161816
18171817 if (argumentCount != 8 ) {
18181818 cliShowParseError ();
@@ -4190,14 +4190,19 @@ static void cliStatus(char *cmdline)
41904190#if defined(USE_OSD )
41914191 if (armingFlags & ARMING_DISABLED_NAVIGATION_UNSAFE ) {
41924192 navArmingBlocker_e reason = navigationIsBlockingArming (NULL );
4193- if (reason & NAV_ARMING_BLOCKER_JUMP_WAYPOINT_ERROR )
4193+ if (reason == NAV_ARMING_BLOCKER_JUMP_WAYPOINT_ERROR )
41944194 cliPrintLinef (" %s" , OSD_MSG_JUMP_WP_MISCONFIG );
4195- if (reason & NAV_ARMING_BLOCKER_MISSING_GPS_FIX ) {
4195+ if (reason == NAV_ARMING_BLOCKER_MISSING_GPS_FIX ) {
41964196 cliPrintLinef (" %s" , OSD_MSG_WAITING_GPS_FIX );
41974197 } else {
4198- if (reason & NAV_ARMING_BLOCKER_NAV_IS_ALREADY_ACTIVE )
4199- cliPrintLinef (" %s" , OSD_MSG_DISABLE_NAV_FIRST );
4200- if (reason & NAV_ARMING_BLOCKER_FIRST_WAYPOINT_TOO_FAR )
4198+ if (reason == NAV_ARMING_BLOCKER_NAV_IS_ALREADY_ACTIVE ) {
4199+ if (armingFlags & ARMING_DISABLED_RC_LINK ) {
4200+ cliPrintLinef (" ENABLE RX TO CLEAR NAV" );
4201+ } else {
4202+ cliPrintLinef (" %s" , OSD_MSG_DISABLE_NAV_FIRST );
4203+ }
4204+ }
4205+ if (reason == NAV_ARMING_BLOCKER_FIRST_WAYPOINT_TOO_FAR )
42014206 cliPrintLinef (" FIRST WP TOO FAR" );
42024207 }
42034208 }
0 commit comments