Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cla_prosim_driver
Project overview
Project overview
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
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fmg005
cla_prosim_driver
Commits
7cf2574c
Commit
7cf2574c
authored
May 05, 2018
by
fmg005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set_heartrate option added
parent
242459dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
example.cpp
example.cpp
+16
-4
No files found.
example.cpp
View file @
7cf2574c
...
...
@@ -11,7 +11,7 @@ using namespace std;
int
main
()
{
/*serial instance arguments*/
std
::
string
port
=
"/dev/tty
ACM
0"
;
std
::
string
port
=
"/dev/tty
USB
0"
;
uint32_t
baudrate
=
115200
;
serial
::
Timeout
timeout
=
serial
::
Timeout
();
serial
::
bytesize_t
bytesize
=
serial
::
eightbits
;
...
...
@@ -30,7 +30,7 @@ int main() {
size_t
*
int_sz
;
cout
<<
"Select number to switch states"
<<
endl
;
cout
<<
"1.Remote Mode
\n
2.Local Mode
\n
3.Set IBP
\n
4.
Get Mode
\n
5
.Quit
\n\n
"
;
cout
<<
"1.Remote Mode
\n
2.Local Mode
\n
3.Set IBP
\n
4.
Set HR
\n
5.GetMode
\n
6
.Quit
\n\n
"
;
getline
(
cin
,
s_input
);
input
=
stoi
(
s_input
,
int_sz
);
...
...
@@ -58,11 +58,23 @@ int main() {
simulator
.
SetIBP
(
1
,
sys
,
diast
);
cout
<<
"
\n
"
;
}
}
else
if
(
input
==
4
)
{
double
hr
;
string
s_hr
;
size_t
*
sz
;
cout
<<
"Enter the Heart Rate: "
;
getline
(
cin
,
s_hr
);
hr
=
stod
(
s_hr
,
sz
);
simulator
.
SetHeartRate
(
hr
);
cout
<<
"
\n
"
;
}
else
if
(
input
==
5
)
{
cout
<<
"Device is currently in "
<<
simulator
.
GetCurrentMode
()
<<
" mode
\n\n
"
;
}
else
if
(
input
==
5
)
{
else
if
(
input
==
6
)
{
break
;
}
}
...
...
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