Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mavlink
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
SASC
mavlink
Commits
33c109c8
Commit
33c109c8
authored
9 years ago
by
Andrew Tridgell
Browse files
Options
Downloads
Patches
Plain Diff
added simple java test
parent
1da7a82d
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
pymavlink/generator/java/examples/Makefile
+10
-0
10 additions, 0 deletions
pymavlink/generator/java/examples/Makefile
pymavlink/generator/java/examples/test.java
+32
-0
32 additions, 0 deletions
pymavlink/generator/java/examples/test.java
with
42 additions
and
0 deletions
pymavlink/generator/java/examples/Makefile
0 → 100644
+
10
−
0
View file @
33c109c8
all
:
build
build
:
mkdir
-p
com/MAVLink
mavgen.py
--lang
Java
--wire-protocol
=
1.0 ../../../../message_definitions/v1.0/ardupilotmega.xml
-o
com/MAVLink
mkdir
-p
build
javac
-d
build test.java com/MAVLink/
*
.java com/MAVLink/common/
*
.java com/MAVLink/ardupilotmega/
*
.java
clean
:
rm
-rf
build com/MAVLink
This diff is collapsed.
Click to expand it.
pymavlink/generator/java/examples/test.java
0 → 100644
+
32
−
0
View file @
33c109c8
import
com.MAVLink.MAVLinkPacket
;
import
com.MAVLink.common.*
;
import
com.MAVLink.Parser
;
import
java.io.FileInputStream
;
import
java.io.FileNotFoundException
;
import
java.io.IOException
;
public
class
test
{
public
static
void
main
(
String
[]
args
)
{
Parser
mavParser
=
new
Parser
();
try
{
FileInputStream
tlog
=
new
FileInputStream
(
args
[
0
]);
try
{
while
(
tlog
.
available
()
>
0
)
{
MAVLinkPacket
packet
=
mavParser
.
mavlink_parse_char
(
tlog
.
read
());
if
(
packet
!=
null
){
System
.
out
.
println
(
"msgid: "
+
packet
.
msgid
);
}
}
System
.
out
.
println
(
"End tlog"
);
}
catch
(
IOException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
}
catch
(
FileNotFoundException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
}
}
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