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
9a8459c7
Commit
9a8459c7
authored
8 years ago
by
dawehr
Browse files
Options
Downloads
Patches
Plain Diff
Added LOG_END message type on quadcopter and in shared commands.
parent
335d61cf
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
groundStation/src/backend/commands.c
+10
-0
10 additions, 0 deletions
groundStation/src/backend/commands.c
groundStation/src/backend/commands.h
+4
-2
4 additions, 2 deletions
groundStation/src/backend/commands.h
quad/sw/modular_quad_pid/src/main.c
+2
-0
2 additions, 0 deletions
quad/sw/modular_quad_pid/src/main.c
with
16 additions
and
2 deletions
groundStation/src/backend/commands.c
+
10
−
0
View file @
9a8459c7
...
...
@@ -55,6 +55,7 @@ command_cb cb_update __attribute__((weak, alias("cb_default")));
command_cb
cb_beginupdate
__attribute__
((
weak
,
alias
(
"cb_default"
)));
command_cb
cb_log
__attribute__
((
weak
,
alias
(
"cb_default"
)));
command_cb
cb_response
__attribute__
((
weak
,
alias
(
"cb_default"
)));
command_cb
cb_logend
__attribute__
((
weak
,
alias
(
"cb_default"
)));
/* Callbacks for configuration */
command_cb
cb_setparam
__attribute__
((
weak
,
alias
(
"cb_default"
)));
...
...
@@ -163,6 +164,15 @@ struct MessageType MessageTypes[MAX_TYPE_ID] =
floatType
,
// Function pointer
&
cb_respparam
},
// LOG_END
{
// Command text
"logend"
,
// Type of the command data
stringType
,
// Function pointer
&
cb_logend
}
};
...
...
This diff is collapsed.
Click to expand it.
groundStation/src/backend/commands.h
+
4
−
2
View file @
9a8459c7
...
...
@@ -29,7 +29,8 @@ enum DataType
* Message type IDs used to know what kind of message we are dealing with
* Enumeration used to index the MessageTypes array in commands.c
*
* DO NOT change this enum or you will break backwards compatibility.
* DO NOT change items in the middle of this enum or you will break backwards compatibility.
* - Add new message types in the slot between MAX_TYPE_ID and the one before it
* DO NOT change this enum without also updating the "MessageTypes" array
* in commands.c to match.
*/
...
...
@@ -44,7 +45,8 @@ enum MessageTypeID{
SETPARAM_ID
,
// 07 - Setting controller parameters. Example: PID constants
GETPARAM_ID
,
// 08 - Getting controller parameters. Example: PID constants
RESPPARAM_ID
,
// 09 - Responding with controller parameters. Example: PID constants
MAX_TYPE_ID
// 10 - Just used to keep track of the size
LOG_END_ID
,
// 10 - Responding with controller parameters. Example: PID constants
MAX_TYPE_ID
// 11 - Just used to keep track of the size. Must remain at the end
};
/*
...
...
This diff is collapsed.
Click to expand it.
quad/sw/modular_quad_pid/src/main.c
+
2
−
0
View file @
9a8459c7
...
...
@@ -129,6 +129,8 @@ int main()
printLogging
(
&
(
structs
.
log_struct
),
&
(
structs
.
parameter_struct
));
resetLogging
();
MIO7_led_off
();
char
data
[
1
]
=
{
0
};
// 1 byte to make compilers happy
send_data
(
LOG_END_ID
,
0
,
data
,
0
);
}
last_kill_condition
=
this_kill_condition
;
...
...
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