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
347f7bc0
Commit
347f7bc0
authored
Sep 13, 2015
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(IOBase): добавил WARNING при одновременном использовании
debouncedelay, ondelay и offdelay.
parent
30945503
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
9 deletions
+20
-9
TODO
TODO
+0
-3
IOBase.cc
extensions/lib/IOBase.cc
+20
-6
No files found.
TODO
View file @
347f7bc0
...
...
@@ -38,9 +38,6 @@ Version 2.0
- ModbusMaster: встроить возможность задать 'pulsar' (регистр сердцебиения)
- IOBase: выдавать warning если заданые одновременно jardelay,ondelay и offdelay
- ТЕСТЫ! ТЕСТЫ! ТЕСТЫ!
- Перевести взаимодействие PassiveObject <--> ProxyManager на shared_ptr (или weak_ptr).
...
...
extensions/lib/IOBase.cc
View file @
347f7bc0
...
...
@@ -550,14 +550,28 @@ bool IOBase::initItem( IOBase* b, UniXML::iterator& it, const std::shared_ptr<SM
b
->
breaklim
=
initIntProp
(
it
,
"breaklim"
,
prefix
,
init_prefix_only
);
b
->
rawdata
=
initIntProp
(
it
,
"rawdata"
,
prefix
,
init_prefix_only
);
long
msec
=
initIntProp
(
it
,
"debouncedelay"
,
prefix
,
init_prefix_only
,
UniSetTimer
::
WaitUpTime
);
b
->
ptDebounce
.
setTiming
(
msec
);
long
d_
msec
=
initIntProp
(
it
,
"debouncedelay"
,
prefix
,
init_prefix_only
,
UniSetTimer
::
WaitUpTime
);
b
->
ptDebounce
.
setTiming
(
d_
msec
);
msec
=
initIntProp
(
it
,
"ondelay"
,
prefix
,
init_prefix_only
,
UniSetTimer
::
WaitUpTime
);
b
->
ptOnDelay
.
setTiming
(
msec
);
long
d_on_msec
=
initIntProp
(
it
,
"ondelay"
,
prefix
,
init_prefix_only
,
UniSetTimer
::
WaitUpTime
);
b
->
ptOnDelay
.
setTiming
(
d_on_msec
);
long
d_off_msec
=
initIntProp
(
it
,
"offdelay"
,
prefix
,
init_prefix_only
,
UniSetTimer
::
WaitUpTime
);
b
->
ptOffDelay
.
setTiming
(
d_off_msec
);
if
(
dlog
&&
d_msec
!=
UniSetTimer
::
WaitUpTime
&&
d_on_msec
!=
UniSetTimer
::
WaitUpTime
&&
d_off_msec
!=
UniSetTimer
::
WaitUpTime
)
{
dlog
->
warn
()
<<
myname
<<
"(IOBase::readItem): "
<<
" 'debouncedelay' is used in conjunction with the 'ondelay' and 'offdelay'. Sure?"
<<
" [ debouncedelay="
<<
d_msec
<<
" ondelay="
<<
d_on_msec
<<
" offdelay="
<<
d_off_msec
<<
" ]"
<<
endl
;
}
msec
=
initIntProp
(
it
,
"offdelay"
,
prefix
,
init_prefix_only
,
UniSetTimer
::
WaitUpTime
);
b
->
ptOffDelay
.
setTiming
(
msec
);
b
->
front
=
false
;
std
::
string
front_t
(
initProp
(
it
,
"iofront"
,
prefix
,
init_prefix_only
)
);
...
...
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