Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
81c46c59
Commit
81c46c59
authored
Nov 23, 2012
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Calibration): исправил реализацию getRawValue()..
parent
29b752d6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
Calibration.h
extensions/include/Calibration.h
+4
-4
Calibration.cc
extensions/lib/Calibration.cc
+9
-0
No files found.
extensions/include/Calibration.h
View file @
81c46c59
...
@@ -45,12 +45,12 @@ class Calibration
...
@@ -45,12 +45,12 @@ class Calibration
/*!
/*!
Получение сырого значения по калиброванному
Получение сырого значения по калиброванному
\param crop - обрезать значение по крайним точкам,
\param crop
_cal
- обрезать значение по крайним точкам,
если
результат < minRaw или > maxRaw
если
оно < minVal или > maxVal (т.е. выходит за диапазон)
Если crop_
result
=false, то может быть возвращено значение outOfRange.
Если crop_
cal
=false, то может быть возвращено значение outOfRange.
*/
*/
long
getRawValue
(
long
cal
,
bool
crop_
result
=
false
);
long
getRawValue
(
long
cal
,
bool
crop_
cal
=
false
);
inline
long
getMinRaw
(){
return
minRaw
;
}
inline
long
getMinRaw
(){
return
minRaw
;
}
inline
long
getMaxRaw
(){
return
maxRaw
;
}
inline
long
getMaxRaw
(){
return
maxRaw
;
}
...
...
extensions/lib/Calibration.cc
View file @
81c46c59
...
@@ -238,6 +238,14 @@ long Calibration::getValue( long raw, bool crop_raw )
...
@@ -238,6 +238,14 @@ long Calibration::getValue( long raw, bool crop_raw )
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
long
Calibration
::
getRawValue
(
long
cal
,
bool
crop_cal
)
long
Calibration
::
getRawValue
(
long
cal
,
bool
crop_cal
)
{
{
if
(
crop_cal
)
{
if
(
cal
<
minVal
)
cal
=
minVal
;
else
if
(
cal
>
maxVal
)
cal
=
maxVal
;
}
for
(
PartsList
::
iterator
it
=
plist
.
begin
();
it
!=
plist
.
end
();
++
it
)
for
(
PartsList
::
iterator
it
=
plist
.
begin
();
it
!=
plist
.
end
();
++
it
)
{
{
TypeOfValue
q
(
it
->
getX
(
cal
));
TypeOfValue
q
(
it
->
getX
(
cal
));
...
@@ -245,6 +253,7 @@ long Calibration::getRawValue( long cal, bool crop_cal )
...
@@ -245,6 +253,7 @@ long Calibration::getRawValue( long cal, bool crop_cal )
return
tRound
(
q
);
return
tRound
(
q
);
}
}
return
outOfRange
;
return
outOfRange
;
}
}
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
...
...
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