Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
ECSS Services
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
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
AcubeSat-OBC
ECSS Services
Commits
7d0242c2
Unverified
Commit
7d0242c2
authored
5 years ago
by
Grigoris Pavlakis
Browse files
Options
Downloads
Patches
Plain Diff
Add warning for setParameterIds()
parent
bd3cffa5
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
inc/Services/Parameter.hpp
+3
-0
3 additions, 0 deletions
inc/Services/Parameter.hpp
src/Services/ParameterService.cpp
+3
-0
3 additions, 0 deletions
src/Services/ParameterService.cpp
with
6 additions
and
0 deletions
inc/Services/Parameter.hpp
+
3
−
0
View file @
7d0242c2
...
@@ -24,6 +24,9 @@
...
@@ -24,6 +24,9 @@
*/
*/
typedef
uint16_t
ParamId
;
typedef
uint16_t
ParamId
;
typedef
etl
::
bitset
<
NUM_OF_FLAGS
>
Flags
;
typedef
etl
::
bitset
<
NUM_OF_FLAGS
>
Flags
;
typedef
enum
{
STRING
=
0
,
INT32
=
1
,
}
TypesList
;
/**
/**
* Parameter class - Breakdown of fields
* Parameter class - Breakdown of fields
...
...
This diff is collapsed.
Click to expand it.
src/Services/ParameterService.cpp
+
3
−
0
View file @
7d0242c2
...
@@ -89,6 +89,9 @@ void ParameterService::setParameterIds(Message& newParamValues) {
...
@@ -89,6 +89,9 @@ void ParameterService::setParameterIds(Message& newParamValues) {
uint16_t
currId
=
newParamValues
.
readUint16
();
uint16_t
currId
=
newParamValues
.
readUint16
();
// the parameter is checked for read-only status and manual update availability
// the parameter is checked for read-only status and manual update availability
if
(
paramsList
.
find
(
currId
)
!=
paramsList
.
end
())
{
if
(
paramsList
.
find
(
currId
)
!=
paramsList
.
end
())
{
// WARNING! SETTING WORKS ONLY WITH UINT32_T INPUT!
// I need a way to know the input's type!
paramsList
.
at
(
currId
)
->
setCurrentValue
(
newParamValues
.
readUint32
());
paramsList
.
at
(
currId
)
->
setCurrentValue
(
newParamValues
.
readUint32
());
}
}
else
{
else
{
...
...
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