Skip to content

Commit

Permalink
hauteur zone protect
Browse files Browse the repository at this point in the history
  • Loading branch information
gitberthe committed Feb 3, 2025
1 parent e34e52c commit 9263530
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 16 deletions.
4 changes: 2 additions & 2 deletions BertheVarioTacPlatformIO/src/BertheVarioTac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
/// \brief Main du projet de vario tactile
///
/// \date creation : 20/09/2024
/// \date modification : 30/01/2025
/// \date modification : 03/02/2025
///

#include "BertheVarioTac.h"

char g_NumVersion[] = "20250130a" ;
char g_NumVersion[] = "20250203a" ;

////////////////////////////////////////////////////////////////////////////////
/// \brief Affiche le nom et le firmware
Expand Down
2 changes: 1 addition & 1 deletion BertheVarioTacPlatformIO/src/BertheVarioTac.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/// \brief Include global du projet de vario tactile
///
/// \date creation : 20/09/2024
/// \date modification : 30/01/2025
/// \date modification : 03/02/2025
///

//#define NO_OTA
Expand Down
32 changes: 20 additions & 12 deletions BertheVarioTacPlatformIO/src/ZonesAeriennes/CZonesAerAll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/// \date 25/11/2024 : la compression du nombre de points de zone ce fait dans
/// BVTZoneAerienne.
/// \date 25/11/2024 : ajout de la compression des float en short et lz4.
/// \date 24/01/2025 : modification
/// \date 03/02/2025 : modification
///

#include "../BertheVarioTac.h"
Expand Down Expand Up @@ -204,17 +204,25 @@ bool IsProtect = ( (*pChar == 'P') && (strstr( pChar , "PROTECT" ) != NULL)) ||
( (*pChar == 'F') && (strstr( pChar , "FFVL-Prot" ) != NULL)) ;
if ( IsProtect )
{
// detertimation plafond zone proetegee
if ( strstr( pChar , "1000m/sol" ) != NULL )
pZone->m_HauteurSolZoneProtege = 1000 ;
else if ( strstr( pChar , "500m/sol" ) != NULL )
pZone->m_HauteurSolZoneProtege = 500 ;
else if ( strstr( pChar , "300m/sol" ) != NULL )
pZone->m_HauteurSolZoneProtege = 300 ;
else if ( strstr( pChar , "150m/sol" ) != NULL )
pZone->m_HauteurSolZoneProtege = 150 ;
else if ( strstr( pChar , "50m/sol" ) != NULL )
pZone->m_HauteurSolZoneProtege = 50 ;
// si m/sol trouve
char * pCharFin = strstr( pChar , "m/sol" ) ;
if ( pCharFin != NULL )
{
char TmpBuff[500] ;
strcpy( TmpBuff , pChar ) ;
*pCharFin = 0 ;
// on recule jusqu'a l'espace
while( *pCharFin != ' ' && *pCharFin != '(' && pCharFin != pChar )
pCharFin-- ;
// on ravance d'un coup
pCharFin++ ;
// hauteur sol
pZone->m_HauteurSolZoneProtege = atoi( pCharFin ) ;
// si probleme de conversion hauteur max
if ( pZone->m_HauteurSolZoneProtege == 0 )
pZone->m_HauteurSolZoneProtege = 1000 ;
}
// 1000 metres par defaut
else
pZone->m_HauteurSolZoneProtege = 1000 ;
}
Expand Down
2 changes: 1 addition & 1 deletion reste-a-faire.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ le 2025-02-03 :

- validation en dynamique

- hauteur sol BertheVario
- menu glissant rando
4 changes: 4 additions & 0 deletions version.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
le 20250203a :
- modification initialisation hauteur sol zone protegée fonction de la denomination
(variable et plus 1000/500/300/150/50m ex: "PROTECT reserve annecy 200m/sol")

le 20250130a :
- ajout de [xc_track] pour envoi de la pression par bluetooth à XC-Track.

Expand Down

0 comments on commit 9263530

Please sign in to comment.