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
a8463a52
Commit
a8463a52
authored
6 years ago
by
Beat Küng
Browse files
Options
Downloads
Patches
Plain Diff
gpssim: cleanup (remove unused fields)
parent
5ae1c658
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/modules/simulator/gpssim/gpssim.cpp
+1
-23
1 addition, 23 deletions
src/modules/simulator/gpssim/gpssim.cpp
with
1 addition
and
23 deletions
src/modules/simulator/gpssim/gpssim.cpp
+
1
−
23
View file @
a8463a52
...
...
@@ -107,20 +107,12 @@ protected:
private
:
bool
_task_should_exit
;
///< flag to make the main worker task exit
int
_serial_fd
;
///< serial interface to GPS
unsigned
_baudrate
;
///< current baudrate
char
_port
[
20
];
///< device / serial port path
volatile
int
_task
;
///< worker task
bool
_healthy
;
///< flag to signal if the GPS is ok
bool
_baudrate_changed
;
///< flag to signal that the baudrate with the GPS has changed
bool
_mode_changed
;
///< flag that the GPS mode has changed
//gps_driver_mode_t _mode; ///< current mode
GPS_Sat_Info
*
_Sat_Info
;
///< instance of GPS sat info data object
struct
vehicle_gps_position_s
_report_gps_pos
;
///< uORB topic for gps position
orb_advert_t
_report_gps_pos_pub
;
///< uORB pub for gps position
struct
satellite_info_s
*
_p_report_sat_info
;
///< pointer to uORB topic for satellite info
orb_advert_t
_report_sat_info_pub
;
///< uORB pub for satellite info
float
_rate
;
///< position update rate
SyncObj
_sync
;
int
_fix_type
;
int
_num_sat
;
...
...
@@ -175,27 +167,17 @@ GPSSIM::GPSSIM(const char *uart_path, bool fake_gps, bool enable_sat_info,
int
fix_type
,
int
num_sat
,
int
noise_multiplier
)
:
VirtDevObj
(
"gps"
,
GPSSIM_DEVICE_PATH
,
nullptr
,
1e6
/
10
),
_task_should_exit
(
false
),
//_healthy(false),
//_mode_changed(false),
//_mode(GPS_DRIVER_MODE_UBX),
//_Helper(nullptr),
_Sat_Info
(
nullptr
),
_report_gps_pos
{},
_report_gps_pos_pub
(
nullptr
),
_p_report_sat_info
(
nullptr
),
_report_sat_info_pub
(
nullptr
),
_rate
(
0.0
f
),
_fix_type
(
fix_type
),
_num_sat
(
num_sat
),
_noise_multiplier
(
noise_multiplier
)
{
// /* store port name */
// strncpy(_port, uart_path, sizeof(_port));
// /* enforce null termination */
// _port[sizeof(_port) - 1] = '\0';
/* we need this potentially before it could be set in task_main */
g_dev
=
this
;
memset
(
&
_report_gps_pos
,
0
,
sizeof
(
_report_gps_pos
));
/* create satellite info data object if requested */
if
(
enable_sat_info
)
{
...
...
@@ -329,9 +311,6 @@ GPSSIM::task_main()
/* loop handling received serial bytes and also configuring in between */
while
(
!
_task_should_exit
)
{
// GPS is obviously detected successfully, reset statistics
//_Helper->reset_update_rates();
int
recv_ret
=
receive
(
TIMEOUT_100MS
);
if
(
recv_ret
>
0
)
{
...
...
@@ -382,7 +361,6 @@ GPSSIM::print_info()
//GPS Mode
PX4_INFO
(
"protocol: SIM"
);
PX4_INFO
(
"port: %s, baudrate: %d, status: %s"
,
_port
,
_baudrate
,
(
_healthy
)
?
"OK"
:
"NOT OK"
);
PX4_INFO
(
"sat info: %s, noise: %d, jamming detected: %s"
,
(
_p_report_sat_info
!=
nullptr
)
?
"enabled"
:
"disabled"
,
_report_gps_pos
.
noise_per_ms
,
...
...
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