Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
21dfcf4f
Unverified
Commit
21dfcf4f
authored
Feb 16, 2018
by
Don Gagne
Committed by
GitHub
Feb 16, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6144 from DonLakeFlyer/PreflightStorage
Remove usage of PREFLIGHT_STORAGE
parents
44ffe7f6
fcddb6f2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
29 deletions
+5
-29
ParameterManager.cc
src/FactSystem/ParameterManager.cc
+0
-22
ParameterManager.h
src/FactSystem/ParameterManager.h
+0
-1
FirmwarePlugin.h
src/FirmwarePlugin/FirmwarePlugin.h
+4
-5
PX4FirmwarePlugin.cc
src/FirmwarePlugin/PX4/PX4FirmwarePlugin.cc
+1
-1
No files found.
src/FactSystem/ParameterManager.cc
View file @
21dfcf4f
...
...
@@ -324,11 +324,6 @@ void ParameterManager::_parameterUpdate(int vehicleId, int componentId, QString
_setupCategoryMap
();
}
if
(
_prevWaitingWriteParamNameCount
!=
0
&&
waitingWriteParamNameCount
==
0
)
{
// If all the writes just finished the vehicle is up to date, so persist.
_saveToEEPROM
();
}
// Update param cache. The param cache is only used on PX4 Firmware since ArduPilot and Solo have volatile params
// which invalidate the cache. The Solo also streams param updates in flight for things like gimbal values
// which in turn causes a perf problem with all the param cache updates.
...
...
@@ -862,23 +857,6 @@ void ParameterManager::_tryCacheHashLoad(int vehicleId, int componentId, QVarian
}
}
void
ParameterManager
::
_saveToEEPROM
(
void
)
{
if
(
_saveRequired
)
{
_saveRequired
=
false
;
if
(
_vehicle
->
firmwarePlugin
()
->
isCapable
(
_vehicle
,
FirmwarePlugin
::
MavCmdPreflightStorageCapability
))
{
_vehicle
->
sendMavCommand
(
MAV_COMP_ID_ALL
,
MAV_CMD_PREFLIGHT_STORAGE
,
true
,
// showError
1
,
// Write parameters to EEPROM
-
1
);
// Don't do anything with mission storage
qCDebug
(
ParameterManagerLog
)
<<
_logVehiclePrefix
()
<<
"_saveToEEPROM"
;
}
else
{
qCDebug
(
ParameterManagerLog
)
<<
_logVehiclePrefix
()
<<
"_saveToEEPROM skipped due to FirmwarePlugin::isCapable"
;
}
}
}
QString
ParameterManager
::
readParametersFromStream
(
QTextStream
&
stream
)
{
QString
errors
;
...
...
src/FactSystem/ParameterManager.h
View file @
21dfcf4f
...
...
@@ -153,7 +153,6 @@ private:
MAV_PARAM_TYPE
_factTypeToMavType
(
FactMetaData
::
ValueType_t
factType
);
FactMetaData
::
ValueType_t
_mavTypeToFactType
(
MAV_PARAM_TYPE
mavType
);
void
_saveToEEPROM
(
void
);
void
_checkInitialLoadComplete
(
void
);
/// First mapping is by component id
...
...
src/FirmwarePlugin/FirmwarePlugin.h
View file @
21dfcf4f
...
...
@@ -43,11 +43,10 @@ public:
/// Set of optional capabilites which firmware may support
typedef
enum
{
SetFlightModeCapability
=
1
<<
0
,
///< FirmwarePlugin::setFlightMode method is supported
MavCmdPreflightStorageCapability
=
1
<<
1
,
///< MAV_CMD_PREFLIGHT_STORAGE is supported
PauseVehicleCapability
=
1
<<
2
,
///< Vehicle supports pausing at current location
GuidedModeCapability
=
1
<<
3
,
///< Vehicle supports guided mode commands
OrbitModeCapability
=
1
<<
4
,
///< Vehicle supports orbit mode
TakeoffVehicleCapability
=
1
<<
5
,
///< Vehicle supports guided takeoff
PauseVehicleCapability
=
1
<<
1
,
///< Vehicle supports pausing at current location
GuidedModeCapability
=
1
<<
2
,
///< Vehicle supports guided mode commands
OrbitModeCapability
=
1
<<
3
,
///< Vehicle supports orbit mode
TakeoffVehicleCapability
=
1
<<
4
,
///< Vehicle supports guided takeoff
}
FirmwareCapabilities
;
/// Maps from on parameter name to another
...
...
src/FirmwarePlugin/PX4/PX4FirmwarePlugin.cc
View file @
21dfcf4f
...
...
@@ -227,7 +227,7 @@ int PX4FirmwarePlugin::manualControlReservedButtonCount(void)
bool
PX4FirmwarePlugin
::
isCapable
(
const
Vehicle
*
vehicle
,
FirmwareCapabilities
capabilities
)
{
int
available
=
MavCmdPreflightStorageCapability
|
SetFlightModeCapability
|
PauseVehicleCapability
|
GuidedModeCapability
;
int
available
=
SetFlightModeCapability
|
PauseVehicleCapability
|
GuidedModeCapability
;
if
(
vehicle
->
multiRotor
()
||
vehicle
->
vtol
())
{
available
|=
TakeoffVehicleCapability
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment