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
53effd50
Commit
53effd50
authored
6 years ago
by
johannes
Committed by
Daniel Agar
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Tools/upload_log: change default upload to public flightreport
parent
35af8f33
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
Tools/upload_log.py
+18
-2
18 additions, 2 deletions
Tools/upload_log.py
with
18 additions
and
2 deletions
Tools/upload_log.py
+
18
−
2
View file @
53effd50
...
...
@@ -71,6 +71,16 @@ def main():
help
=
"
Log source (Eg. CI)
"
,
default
=
"
webui
"
)
parser
.
add_argument
(
"
--email
"
,
dest
=
"
email
"
,
type
=
str
,
help
=
"
Your e-mail (to send the upload link)
"
,
default
=
None
)
parser
.
add_argument
(
"
--type
"
,
dest
=
"
type
"
,
type
=
str
,
default
=
'
flightreport
'
,
help
=
"
The upload type (either flightreport or personal).
"
)
parser
.
add_argument
(
"
--videoUrl
"
,
dest
=
"
videoUrl
"
,
type
=
str
,
default
=
''
,
help
=
"
An Url to a video (only used for type flightreport).
"
)
parser
.
add_argument
(
"
--rating
"
,
dest
=
"
rating
"
,
type
=
str
,
default
=
'
notset
'
,
help
=
"
A rating for the flight (only used for type flightreport).
"
)
parser
.
add_argument
(
"
--windSpeed
"
,
dest
=
"
windSpeed
"
,
type
=
int
,
default
=-
1
,
help
=
"
A wind speed category for the flight (only used for flightreport).
"
)
parser
.
add_argument
(
"
--public
"
,
dest
=
"
public
"
,
type
=
bool
,
default
=
True
,
help
=
"
Whether the log is uploaded as public (only used for flightreport).
"
)
parser
.
add_argument
(
"
FILE
"
,
help
=
"
ULog file(s)
"
,
nargs
=
"
+
"
)
args
=
parser
.
parse_args
()
...
...
@@ -92,8 +102,14 @@ def main():
else
:
email
=
args
.
email
payload
=
{
'
type
'
:
'
personal
'
,
'
description
'
:
description
,
'
feedback
'
:
feedback
,
'
email
'
:
email
,
'
source
'
:
args
.
source
}
payload
=
{
'
type
'
:
args
.
type
,
'
description
'
:
description
,
'
feedback
'
:
feedback
,
'
email
'
:
email
,
'
source
'
:
args
.
source
}
if
args
.
type
==
'
flightreport
'
:
payload
[
'
videoUrl
'
]
=
args
.
videoUrl
payload
[
'
rating
'
]
=
args
.
rating
payload
[
'
windSpeed
'
]
=
args
.
windSpeed
payload
[
'
public
'
]
=
str
(
args
.
public
).
lower
()
for
file_name
in
args
.
FILE
:
if
not
quiet
:
...
...
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