Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ipcmini
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cs
ds
ipcmini
Commits
7e1735c7
Commit
7e1735c7
authored
3 years ago
by
Alessio Igor Bogani
Browse files
Options
Downloads
Patches
Plain Diff
Avoid to change device's mode during init()
parent
e51ca3ee
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/IPCMini.cpp
+10
-9
10 additions, 9 deletions
src/IPCMini.cpp
with
10 additions
and
9 deletions
src/IPCMini.cpp
+
10
−
9
View file @
7e1735c7
...
...
@@ -249,6 +249,15 @@ void IPCMini::init_device()
attr_Model_read
[
0
]
=
new
char
[
MAX_DEVSTRING_LENGTH
];
attr_SerialNumber_read
[
0
]
=
new
char
[
MAX_DEVSTRING_LENGTH
];
/* Che if the mBar is pressure unit used */
int
pressure_unit
;
read_window
(
600
,
pressure_unit
);
if
(
pressure_unit
!=
1
)
{
Tango
::
Except
::
throw_exception
(
""
,
"mBar is not the pressure unit used"
,
"Agilent4uhv::init_device()"
);
}
/* Identify model:
* X3602-64010 con 1 canale
*/
...
...
@@ -266,16 +275,8 @@ void IPCMini::init_device()
read_window
(
323
,
serial
);
strncpy
(
attr_SerialNumber_read
[
0
],
serial
.
c_str
(),
MAX_DEVSTRING_LENGTH
);
// Set the mode
// int mode = 0; /* Serial */
// write_window(8, mode);
/* Setup mBar as pressure unit used */
int
pressure_unit
=
1
/* mBar */
;
write_window
(
600
,
pressure_unit
);
/* Read all the device data */
static
const
int
nw
[]
=
{
8
,
11
/*, 108 */
,
206
static
const
int
nw
[]
=
{
8
,
11
/*, 108
, 205
*/
,
206
/*, 319, 323, 503, 504, 600 */
,
601
,
602
,
603
,
610
,
612
,
613
,
614
,
615
,
800
,
801
,
804
,
810
,
811
/*, 890 */
};
vector
<
int
>
normal_windows
(
nw
,
nw
+
sizeof
(
nw
)
/
sizeof
(
nw
[
0
]));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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