GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEV
,
WEBDEV
e
WINDEV Mobile
Inicio
|
Mensagens recentes
|
Conecte-se...
|
Disconnect
|
Português
Inicio
→
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
Iniciado por adrianoboller, nov., 24 2014 12:17 PM - Sem resposta
Conecte-se…
adrianoboller
#1
Membro registado
3.659 mensagems
Popularité : +175 (223 votes)
Publicado em novembro, 24 2014 - 12:17 PM
// 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
Denunciar
0
0
→ Voltar para WINDEV Mobile 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (versões anteriores)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Tipo de Pesquisa
Apenas tópicos
Todas as mensagens
Período de pesquisa
Qualquer momento
Última hora
Últimas 24 horas
Semana passada
Mês passado
Ano passado
Cancelar
Pré-visualização da sua mensagem
Adicionar imagem
Importar uma imagem de uma URL
Enviar uma imagem a partir do seu disco
Deixe um ficheiro ou clique em "Procurar ..."
ou
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto