FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV Mobile 2024
→
Celular Acelerometro Detect Landscape or Portrait - Detecta se o celular esta em Retrato ou paisagem
Celular Acelerometro Detect Landscape or Portrait - Detecta se o celular esta em Retrato ou paisagem
Débuté par adrianoboller, 24 nov. 2014 12:17 - Aucune réponse
Connectez-vous…
adrianoboller
#1
Membre enregistré
3 657 messages
Popularité : +175 (223 votes)
Posté le 24 novembre 2014 - 12:17
// Summary: Detects the acceleration
// Syntax:
//SYS_Acelerometro_Detect (<nVertical>, <nLongitudinal>, <nLateral>)
//
// Parameters:
//
nVertical: correspond to the measurement of the device acceleration on the vertical axis (Z) in m/s²
//
nLongitudinal: correspond to the measurement of the device acceleration on the longitudinal axis (Y) in m/s²
//
nLateral: correspond to the measurement of the device acceleration on the horizontal axis (X) in m/s²
// Example:
// Indicate an example.
//
//
Speed (integer): <specify the role of Speed>
// Return value:
Procedure
SYS_Acelerometro_Detect
(
n
Vertical
,
n
Longitudinal
,
n
Lateral
)
// Display the speeds
s
Vertical is
string
=
IntegerPart
(
n
Vertical
) + “
.
” +
DecimalPart
(
n
Vertical
)
[
[
3
TO
4
]
]
s
Longitudinal is
string
=
IntegerPart
(
n
Longitudinal
) + “
.
” +
DecimalPart
(
n
Longitudinal
)
[
[
3
TO
4
]
]
s
Lateral is
string
=
IntegerPart
(
n
Lateral
) + “
.
” +
DecimalPart
(
n
Lateral
)
[
[
3
TO
4
]
]
// Retrieve the lateral speed
n
MaxLateralSpeed is
int
=
IntegerPart
(
n
Lateral
)
IF
n
MaxLateralSpeed
<
0
THEN
n
MaxLateralSpeed
= -
n
MaxLateralSpeed
END
IF
s
Lateral
>
=
7
THEN
gs
HorizontalVertical
=
"Horizontal"
ELSE
gs
HorizontalVertical
=
"Vertical"
END
Signaler
0
0
→ Revenir à WINDEV Mobile 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte