Skip to content
Snippets Groups Projects
Commit 15440ab8 authored by Mikhail Nozdrin's avatar Mikhail Nozdrin
Browse files

1.10. RTS signal inverted

(due to oscilloscope experiment with the old version)
parent dc270d8e
No related branches found
No related tags found
No related merge requests found
......@@ -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, TIOCMBIS, &RTS_flag); // Set RTS
ioctl(fd, TIOCMBIC, &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, TIOCMBIC, &RTS_flag); // Drop RTS
ioctl(fd, TIOCMBIS, &RTS_flag); // Set RTS
}
void Gun::ADC_request(unsigned char channel)
......
-------------------------------------------------------------------------------
Version 0.10
-------------------------------------------------------------------------------
- RTS signal inverted (due to oscilloscope experiment with the old version).
-------------------------------------------------------------------------------
Version 0.9
-------------------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment