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
a80e237a
Commit
a80e237a
authored
1 year ago
by
abeinder
Browse files
Options
Downloads
Patches
Plain Diff
I broke the gamepad and fixed it
parent
5b14dfa4
No related branches found
No related tags found
3 merge requests
!104
adding cflib to this branch
,
!94
Merge cflib adapter into main
,
!84
Pycrocart
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
pycrocart/PyCroCart.py
+1
-1
1 addition, 1 deletion
pycrocart/PyCroCart.py
pycrocart/SetpointMenu.py
+10
-7
10 additions, 7 deletions
pycrocart/SetpointMenu.py
pycrocart/logging_variables.json
+1
-6
1 addition, 6 deletions
pycrocart/logging_variables.json
with
12 additions
and
14 deletions
pycrocart/PyCroCart.py
+
1
−
1
View file @
a80e237a
...
...
@@ -61,7 +61,7 @@ if __name__ == '__main__':
app
=
QApplication
(
sys
.
argv
)
cf1
=
CrazyflieProtoConnection
()
uri
=
'
radio://0/
8
0/2M/E7E7E7E7E7
'
uri
=
'
radio://0/
2
0/2M/E7E7E7E7E7
'
cf1
.
connect
(
uri
)
cf1
.
scf
.
cf
.
commander
=
uCartCommander
.
Commander
(
cf1
.
scf
.
cf
)
...
...
This diff is collapsed.
Click to expand it.
pycrocart/SetpointMenu.py
+
10
−
7
View file @
a80e237a
...
...
@@ -173,13 +173,16 @@ class SetpointMenu(QWidget):
else
:
self
.
setpoint_handler
.
setRateMode
()
yaw
=
self
.
cap_max_value
(
yaw
,
20
,
-
20
)
pitch
=
self
.
cap_max_value
(
pitch
,
5
,
-
5
)
roll
=
self
.
cap_max_value
(
roll
,
5
,
-
5
)
# If you are a flypi do this
thrust
=
thrust
+
100
thrust
=
self
.
cap_max_value
(
thrust
,
340
,
240
)
if
self
.
gamepad_button
.
isChecked
():
yaw
=
self
.
cap_max_value
(
yaw
,
20
,
-
20
)
pitch
=
self
.
cap_max_value
(
pitch
,
5
,
-
5
)
roll
=
self
.
cap_max_value
(
roll
,
5
,
-
5
)
# If you are a flypi do this
thrust
=
thrust
+
240
thrust
=
self
.
cap_max_value
(
thrust
,
340
,
240
)
print
(
"
thrust
"
)
print
(
thrust
)
# otherwise don't..... but I'm not changing that rn
...
...
This diff is collapsed.
Click to expand it.
pycrocart/logging_variables.json
+
1
−
6
View file @
a80e237a
...
...
@@ -2,12 +2,7 @@
"group1"
:
{
"update_frequency_ms"
:
50
,
"vars"
:
[
"ctrlStdnt.msrdPitchRate"
,
"ctrlStdnt.dsirdPitchRate"
,
"stateEstimate.roll"
,
"stateEstimate.yaw"
,
"ctrlStdnt.desiredPitch"
]
},
"group2"
:
{
"update_frequency_ms"
:
50
,
"vars"
:
[
"ctrlStdnt.cmd_thrust"
,
"ctrlStdnt.cmd_roll"
,
"ctrlStdnt.cmd_pitch"
,
"stateEstimate.pitch"
,
"ctrlStdnt.cmd_yaw"
]
"vars"
:
[
"stateEstimate.roll"
,
"stateEstimate.yaw"
,
"stateEstimate.pitch"
]
},
"group3"
:
{
...
...
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