Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
Linac-200 Gun Server
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
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
Mikhail Nozdrin
Linac-200 Gun Server
Commits
15440ab8
Commit
15440ab8
authored
4 years ago
by
Mikhail Nozdrin
Browse files
Options
Downloads
Patches
Plain Diff
1.10. RTS signal inverted
(due to oscilloscope experiment with the old version)
parent
dc270d8e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Gun.cpp
+7
-4
7 additions, 4 deletions
Gun.cpp
changelog.txt
+6
-0
6 additions, 0 deletions
changelog.txt
with
13 additions
and
4 deletions
Gun.cpp
+
7
−
4
View file @
15440ab8
...
...
@@ -138,7 +138,8 @@ void Gun::delete_device()
DEBUG_STREAM
<<
"Gun::delete_device() "
<<
device_name
<<
endl
;
/*----- PROTECTED REGION ID(Gun::delete_device) ENABLED START -----*/
// Delete device allocated objects
ioctl
(
fd
,
TIOCMBIC
,
&
RTS_flag
);
// Drop RTS
close
(
fd
);
// Close port
/*----- PROTECTED REGION END -----*/
// Gun::delete_device
delete
[]
attr_VrefFS_read
;
...
...
@@ -919,6 +920,8 @@ void Gun::port_init()
set_status
(
"FAULT. Port: /dev/ttyS2"
);
DEBUG_STREAM
<<
"Fault. Port: /dev/ttyS2. Error "
<<
errno
<<
" from tcsetattr(): "
<<
strerror
(
errno
)
<<
endl
;
}
ioctl
(
fd
,
TIOCMBIS
,
&
RTS_flag
);
// Set RTS
}
// Write 4 bytes in COM-port
...
...
@@ -929,7 +932,7 @@ void Gun::send_ctrl_msg(unsigned char b1, unsigned char b2, unsigned char b3, un
unsigned
char
command
[
1
];
// Data to write
ioctl
(
fd
,
TIOCMBI
S
,
&
RTS_flag
);
//
Set
RTS
ioctl
(
fd
,
TIOCMBI
C
,
&
RTS_flag
);
//
Drop
RTS
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
...
...
@@ -946,9 +949,9 @@ void Gun::send_ctrl_msg(unsigned char b1, unsigned char b2, unsigned char b3, un
usleep
(
50
);
}
usleep
(
75
);
// Time to finish byte sending (delay (10) in GunCtrl)
//
usleep(75); // Time to finish byte sending (delay (10) in GunCtrl)
ioctl
(
fd
,
TIOCMBI
C
,
&
RTS_flag
);
//
Drop
RTS
ioctl
(
fd
,
TIOCMBI
S
,
&
RTS_flag
);
//
Set
RTS
}
void
Gun
::
ADC_request
(
unsigned
char
channel
)
...
...
This diff is collapsed.
Click to expand it.
changelog.txt
+
6
−
0
View file @
15440ab8
-------------------------------------------------------------------------------
Version 0.10
-------------------------------------------------------------------------------
- RTS signal inverted (due to oscilloscope experiment with the old version).
-------------------------------------------------------------------------------
Version 0.9
-------------------------------------------------------------------------------
...
...
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