Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto Ruiz Garcia
Firmware
Commits
528e2826
Commit
528e2826
authored
9 years ago
by
Mark Whitehorn
Committed by
Lorenz Meier
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
run astyle
parent
3b9ef1ce
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/drivers/sPort_telemetry/sPort_telemetry.c
+13
-9
13 additions, 9 deletions
src/drivers/sPort_telemetry/sPort_telemetry.c
with
13 additions
and
9 deletions
src/drivers/sPort_telemetry/sPort_telemetry.c
+
13
−
9
View file @
528e2826
...
...
@@ -259,11 +259,11 @@ static int sPort_telemetry_thread_main(int argc, char *argv[])
// allow a minimum of 500usec before reply
usleep
(
500
);
static
hrt_abstime
lastBATV
=
0
;
static
hrt_abstime
lastCUR
=
0
;
static
hrt_abstime
lastALT
=
0
;
static
hrt_abstime
lastSPD
=
0
;
static
hrt_abstime
lastFUEL
=
0
;
static
hrt_abstime
lastBATV
=
0
;
static
hrt_abstime
lastCUR
=
0
;
static
hrt_abstime
lastALT
=
0
;
static
hrt_abstime
lastSPD
=
0
;
static
hrt_abstime
lastFUEL
=
0
;
switch
(
sbuf
[
1
])
{
...
...
@@ -280,7 +280,8 @@ static int sPort_telemetry_thread_main(int argc, char *argv[])
case
SMARTPORT_POLL_2
:
/* report battery current at 5Hz */
/* report battery current at 5Hz */
if
(
now
-
lastCUR
>
200
*
1000
)
{
lastCUR
=
now
;
/* send battery current */
...
...
@@ -291,7 +292,8 @@ static int sPort_telemetry_thread_main(int argc, char *argv[])
case
SMARTPORT_POLL_3
:
/* report altitude at 5Hz */
/* report altitude at 5Hz */
if
(
now
-
lastALT
>
200
*
1000
)
{
lastALT
=
now
;
/* send altitude */
...
...
@@ -302,7 +304,8 @@ static int sPort_telemetry_thread_main(int argc, char *argv[])
case
SMARTPORT_POLL_4
:
/* report speed at 5Hz */
/* report speed at 5Hz */
if
(
now
-
lastSPD
>
200
*
1000
)
{
lastSPD
=
now
;
/* send speed */
...
...
@@ -312,7 +315,8 @@ static int sPort_telemetry_thread_main(int argc, char *argv[])
break
;
case
SMARTPORT_POLL_5
:
/* report fuel at 1Hz */
/* report fuel at 1Hz */
if
(
now
-
lastFUEL
>
1000
*
1000
)
{
lastFUEL
=
now
;
/* send fuel */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment