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
a6f93c30
Commit
a6f93c30
authored
6 years ago
by
Beat Küng
Committed by
Daniel Agar
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Move px4io firmware update logic block to rc.io."
This reverts commit
0928112a
.
parent
002b8b6a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ROMFS/px4fmu_common/init.d/rc.io
+1
-56
1 addition, 56 deletions
ROMFS/px4fmu_common/init.d/rc.io
ROMFS/px4fmu_common/init.d/rcS
+59
-8
59 additions, 8 deletions
ROMFS/px4fmu_common/init.d/rcS
with
60 additions
and
64 deletions
ROMFS/px4fmu_common/init.d/rc.io
+
1
−
56
View file @
a6f93c30
...
...
@@ -3,60 +3,6 @@
# PX4IO interface init script.
#
#
# Check if PX4IO present and update firmware if needed.
#
if
[
-
f
/
etc
/
extras
/
px4io
-
v2
.
bin
]
then
set
IO_FILE
/
etc
/
extras
/
px4io
-
v2
.
bin
if
px4io
checkcrc
$
{
IO_FILE
}
then
set
IO_PRESENT
yes
else
tune_control
play
-
m
MLL32CP8MB
if
px4io
start
then
# Try to safety px4 io so motor outputs dont go crazy.
if
px4io
safety_on
then
# success! no-op
else
# px4io did not respond to the safety command.
px4io
stop
fi
fi
if
px4io
forceupdate
14662
$
{
IO_FILE
}
then
usleep
10000
if
px4io
checkcrc
$
{
IO_FILE
}
then
echo
"PX4IO CRC OK after updating"
>>
$
LOG_FILE
tune_control
play
-
m
MLL8CDE
set
IO_PRESENT
yes
else
echo
"PX4IO update failed"
>>
$
LOG_FILE
# Error tune.
tune_control
play
-
t
2
fi
else
echo
"PX4IO update failed"
>>
$
LOG_FILE
# Error tune.
tune_control
play
-
t
2
fi
fi
fi
if
[
$
USE_IO
==
yes
-
a
$
IO_PRESENT
==
no
]
then
echo
"PX4IO not found"
>>
$
LOG_FILE
# Error tune.
tune_control
play
-
t
2
fi
if
px4io
start
then
# Allow PX4IO to recover from midair restarts.
...
...
@@ -66,6 +12,5 @@ then
px4io
limit
400
else
echo
"PX4IO start failed"
>>
$
LOG_FILE
# Error tune.
tune_control
play
-
t
2
tune_control
play
-
m
$
{
TUNE_ERR
}
fi
This diff is collapsed.
Click to expand it.
ROMFS/px4fmu_common/init.d/rcS
+
59
−
8
View file @
a6f93c30
...
...
@@ -335,6 +335,53 @@ else
param set SYS_AUTOCONFIG 0
fi
#
# Check if PX4IO present and update firmware if needed.
#
if [ -f /etc/extras/px4io-v2.bin ]
then
set IO_FILE /etc/extras/px4io-v2.bin
if px4io checkcrc ${IO_FILE}
then
set IO_PRESENT yes
else
tune_control play -m MLL32CP8MB
if px4io start
then
# Try to safety px4 io so motor outputs don't go crazy.
if px4io safety_on
then
# success! no-op
else
# px4io did not respond to the safety command.
px4io stop
fi
fi
if px4io forceupdate 14662 ${IO_FILE}
then
usleep 10000
if px4io checkcrc ${IO_FILE}
then
echo "PX4IO CRC OK after updating" >> $LOG_FILE
tune_control play -m MLL8CDE
set IO_PRESENT yes
else
echo "PX4IO update failed" >> $LOG_FILE
# Error tune.
tune_control play -t 2
fi
else
echo "PX4IO update failed" >> $LOG_FILE
# Error tune.
tune_control play -t 2
fi
fi
fi
#
# Set USE_IO flag.
#
...
...
@@ -343,6 +390,18 @@ else
set USE_IO yes
fi
if [ $USE_IO == yes -a $IO_PRESENT == no ]
then
echo "PX4IO not found" >> $LOG_FILE
# Error tune.
tune_control play -t 2
fi
if [ $IO_PRESENT == no -o $USE_IO == no ]
then
rc_input start
fi
#
# Sensors System (start before Commander so Preflight checks are properly run).
# Commander needs to be this early for in-air-restarts.
...
...
@@ -445,14 +504,6 @@ else
#
sh /etc/init.d/rc.logging
#
# Start the rc_input driver.
#
if [ $USE_IO == no -o $IO_PRESENT == no ]
then
rc_input start
fi
#
# Start vmount to control mounts such as gimbals, disabled by default.
#
...
...
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