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
b7d7b567
Commit
b7d7b567
authored
8 years ago
by
David Sidrane
Committed by
Lorenz Meier
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Changes to px4iofirmware for Upstrem Nuttx c++ init and logging changes
parent
ff0e810b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/modules/px4iofirmware/px4io.c
+16
-6
16 additions, 6 deletions
src/modules/px4iofirmware/px4io.c
src/modules/px4iofirmware/px4io.h
+1
-1
1 addition, 1 deletion
src/modules/px4iofirmware/px4io.h
with
17 additions
and
7 deletions
src/modules/px4iofirmware/px4io.c
+
16
−
6
View file @
b7d7b567
/****************************************************************************
*
* Copyright (c) 2012-201
4
PX4 Development Team. All rights reserved.
* Copyright (c) 2012-201
5
PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
...
...
@@ -54,6 +54,7 @@
#include
<systemlib/perf_counter.h>
#include
<systemlib/pwm_limit/pwm_limit.h>
#include
<systemlib/systemlib.h>
#include
<stm32_uart.h>
...
...
@@ -62,8 +63,6 @@
__EXPORT
int
user_start
(
int
argc
,
char
*
argv
[]);
extern
void
up_cxxinitialize
(
void
);
struct
sys_state_s
system_state
;
static
struct
hrt_call
serial_dma_call
;
...
...
@@ -238,9 +237,20 @@ user_start(int argc, char *argv[])
/* configure the first 8 PWM outputs (i.e. all of them) */
up_pwm_servo_init
(
0xff
);
#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
/* run C++ ctors before we go any further */
up_cxxinitialize
();
# if defined(CONFIG_EXAMPLES_NSH_CXXINITIALIZE)
# error CONFIG_EXAMPLES_NSH_CXXINITIALIZE Must not be defined! Use CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE.
# endif
#else
# error platform is dependent on c++ both CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE must be defined.
#endif
/* reset all to zero */
memset
(
&
system_state
,
0
,
sizeof
(
system_state
));
...
...
@@ -259,7 +269,7 @@ user_start(int argc, char *argv[])
#endif
/* print some startup info */
low
syslog
(
"
\n
PX4IO: starting
\n
"
);
syslog
(
LOG_INFO
,
"
\n
PX4IO: starting
\n
"
);
/* default all the LEDs to off while we start */
LED_AMBER
(
false
);
...
...
@@ -301,7 +311,7 @@ user_start(int argc, char *argv[])
perf_counter_t
loop_perf
=
perf_alloc
(
PC_INTERVAL
,
"loop"
);
struct
mallinfo
minfo
=
mallinfo
();
low
syslog
(
"MEM: free %u, largest %u
\n
"
,
minfo
.
mxordblk
,
minfo
.
fordblks
);
syslog
(
LOG_INFO
,
"MEM: free %u, largest %u
\n
"
,
minfo
.
mxordblk
,
minfo
.
fordblks
);
/* initialize PWM limit lib */
pwm_limit_init
(
&
pwm_limit
);
...
...
@@ -321,7 +331,7 @@ user_start(int argc, char *argv[])
*/
if
(
minfo
.
mxordblk
<
600
)
{
low
syslog
(
"ERR: not enough MEM"
);
syslog
(
LOG_ERR
,
"ERR: not enough MEM"
);
bool
phase
=
false
;
while
(
true
)
{
...
...
This diff is collapsed.
Click to expand it.
src/modules/px4iofirmware/px4io.h
+
1
−
1
View file @
b7d7b567
...
...
@@ -69,7 +69,7 @@
#ifdef DEBUG
# include <debug.h>
# define debug(fmt, args...)
low
syslog(fmt "\n", ##args)
# define debug(fmt, args...) syslog(
LOG_DEBUG,
fmt "\n", ##args)
#else
# define debug(fmt, args...) do {} while(0)
#endif
...
...
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