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
9ff6751e
Commit
9ff6751e
authored
8 years ago
by
thedevleon
Committed by
Lorenz Meier
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
hotfix for frsky dport telemetry (#4409)
parent
05885e4e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+5
-0
5 additions, 0 deletions
.gitignore
src/drivers/frsky_telemetry/frsky_data.c
+1
-14
1 addition, 14 deletions
src/drivers/frsky_telemetry/frsky_data.c
with
6 additions
and
14 deletions
.gitignore
+
5
−
0
View file @
9ff6751e
...
...
@@ -64,6 +64,11 @@ CMakeLists.txt.user
GPATH
GRTAGS
GTAGS
*.config
*.creator
*.creator.user
*.files
*.includes
# uavcan firmware
ROMFS/px4fmu_common/uavcan/
...
...
This diff is collapsed.
Click to expand it.
src/drivers/frsky_telemetry/frsky_data.c
+
1
−
14
View file @
9ff6751e
...
...
@@ -53,7 +53,6 @@
#include
<uORB/topics/battery_status.h>
#include
<uORB/topics/sensor_combined.h>
#include
<uORB/topics/vehicle_global_position.h>
#include
<uORB/topics/vehicle_status.h>
#include
<drivers/drv_hrt.h>
...
...
@@ -94,12 +93,10 @@
static
struct
battery_status_s
*
battery_status
;
static
struct
vehicle_global_position_s
*
global_pos
;
static
struct
vehicle_status_s
*
vehicle_status
;
static
struct
sensor_combined_s
*
sensor_combined
;
static
int
battery_status_sub
=
-
1
;
static
int
vehicle_global_position_sub
=
-
1
;
static
int
vehicle_status_sub
=
-
1
;
static
int
sensor_sub
=
-
1
;
/**
...
...
@@ -110,15 +107,13 @@ bool frsky_init()
battery_status
=
malloc
(
sizeof
(
struct
battery_status_s
));
global_pos
=
malloc
(
sizeof
(
struct
vehicle_global_position_s
));
sensor_combined
=
malloc
(
sizeof
(
struct
sensor_combined_s
));
vehicle_status
=
malloc
(
sizeof
(
struct
vehicle_status_s
));
if
(
battery_status
==
NULL
||
global_pos
==
NULL
||
sensor_combined
==
NULL
||
vehicle_status
)
{
if
(
battery_status
==
NULL
||
global_pos
==
NULL
||
sensor_combined
==
NULL
)
{
return
false
;
}
battery_status_sub
=
orb_subscribe
(
ORB_ID
(
battery_status
));
vehicle_global_position_sub
=
orb_subscribe
(
ORB_ID
(
vehicle_global_position
));
vehicle_status_sub
=
orb_subscribe
(
ORB_ID
(
vehicle_status
));
sensor_sub
=
orb_subscribe
(
ORB_ID
(
sensor_combined
));
return
true
;
}
...
...
@@ -128,7 +123,6 @@ void frsky_deinit()
free
(
battery_status
);
free
(
global_pos
);
free
(
sensor_combined
);
free
(
vehicle_status
);
}
/**
...
...
@@ -201,13 +195,6 @@ void frsky_update_topics()
if
(
updated
)
{
orb_copy
(
ORB_ID
(
vehicle_global_position
),
vehicle_global_position_sub
,
global_pos
);
}
/* get a local copy of the vehicle status data */
orb_check
(
vehicle_status_sub
,
&
updated
);
if
(
updated
)
{
orb_copy
(
ORB_ID
(
vehicle_status
),
vehicle_status_sub
,
vehicle_status
);
}
}
/**
...
...
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