Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MicroCART
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Distributed Autonomous Networked Control Lab
MicroCART
Commits
f17e6ad0
Commit
f17e6ad0
authored
5 years ago
by
James Talbert
Browse files
Options
Downloads
Patches
Plain Diff
Fixed issue with the unix compile for tests
parent
47573c61
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
quad/src/quad_app/callbacks.c
+2
-6
2 additions, 6 deletions
quad/src/quad_app/callbacks.c
with
2 additions
and
6 deletions
quad/src/quad_app/callbacks.c
+
2
−
6
View file @
f17e6ad0
...
@@ -40,7 +40,7 @@ int cb_packetlog(struct modular_structs* structs, struct metadata *meta, u8 *dat
...
@@ -40,7 +40,7 @@ int cb_packetlog(struct modular_structs* structs, struct metadata *meta, u8 *dat
n_msg_received
+=
1
;
n_msg_received
+=
1
;
total_payload_received
+=
length
;
total_payload_received
+=
length
;
int
len
=
sprintf
(
buf
,
"Packets received: %d"
,
n_msg_received
);
int
len
=
sprintf
(
buf
,
"Packets received: %d"
,
n_msg_received
);
send_data
(
structs
->
hardware_struct
.
comm
.
uart
,
PACKETLOG_ID
,
0
,
buf
,
len
);
send_data
(
structs
->
hardware_struct
.
comm
.
uart
,
PACKETLOG_ID
,
0
,
(
u8
*
)
buf
,
len
);
return
0
;
return
0
;
}
}
...
@@ -54,7 +54,7 @@ int cb_getpacketlogs(struct modular_structs* structs, struct metadata *meta, u8
...
@@ -54,7 +54,7 @@ int cb_getpacketlogs(struct modular_structs* structs, struct metadata *meta, u8
// Message logging number of messages received and size of payload received
// Message logging number of messages received and size of payload received
int
len
=
snprintf
((
char
*
)
buf
,
sizeof
buf
,
"%d,%lu"
,
n_msg_received
,
total_payload_received
);
int
len
=
snprintf
((
char
*
)
buf
,
sizeof
buf
,
"%d,%lu"
,
n_msg_received
,
total_payload_received
);
send_data
(
structs
->
hardware_struct
.
comm
.
uart
,
LOG_ID
,
0
,
buf
,
len
>=
sizeof
(
buf
)
?
255
:
len
+
1
);
send_data
(
structs
->
hardware_struct
.
comm
.
uart
,
LOG_ID
,
0
,
(
u8
*
)
buf
,
len
>=
sizeof
(
buf
)
?
255
:
len
+
1
);
return
0
;
return
0
;
}
}
...
@@ -437,10 +437,6 @@ int cb_addnode(struct modular_structs *structs, struct metadata *meta, unsigned
...
@@ -437,10 +437,6 @@ int cb_addnode(struct modular_structs *structs, struct metadata *meta, unsigned
int
cb_overrideoutput
(
struct
modular_structs
*
structs
,
struct
metadata
*
meta
,
unsigned
char
*
data
,
unsigned
short
length
)
{
int
cb_overrideoutput
(
struct
modular_structs
*
structs
,
struct
metadata
*
meta
,
unsigned
char
*
data
,
unsigned
short
length
)
{
override_t
*
override_info
=
&
structs
->
override_struct
;
override_t
*
override_info
=
&
structs
->
override_struct
;
int
offset_mode
=
offsetof
(
override_t
,
mode
);
int
offset_values
=
offsetof
(
override_t
,
values
);
int
offset_value0
=
offsetof
(
override_t
,
values
[
0
]);
int
num_overrides
=
sizeof
(
structs
->
override_struct
.
values
)
int
num_overrides
=
sizeof
(
structs
->
override_struct
.
values
)
/
sizeof
(
*
structs
->
override_struct
.
values
);
/
sizeof
(
*
structs
->
override_struct
.
values
);
...
...
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