Changeset 4484 for trunk/MagicSoft
- Timestamp:
- 08/04/04 16:38:55 (20 years ago)
- Location:
- trunk/MagicSoft/AMC/activemirrorcontrol/activemirrorcontrol
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/AMC/activemirrorcontrol/activemirrorcontrol/amcserialport.cpp
r3401 r4484 73 73 newtio.c_iflag = IGNPAR | ICRNL; 74 74 newtio.c_oflag = 0; 75 // newtio.c_oflag = OCRNL; 75 76 76 77 /* set input mode (non-canonical, no echo, ...) */ … … 88 89 } 89 90 91 fcntl( m_fd, F_SETFL, 0); 90 92 return; 91 93 } … … 100 102 int AMCSerialPort::readBlock( char* p_pBuffer, int p_iMaxLen ) 101 103 { 104 // usleep(1000); 102 105 int num, iTot = 0; 103 106 char* pBuf = p_pBuffer; … … 105 108 // { 106 109 num = read( m_fd, pBuf, p_iMaxLen ); 107 // qDebug("Read %d Bytes", num);108 // usleep(1000);109 // if( num == 0)110 // num = read( m_fd, p_pBuffer, p_iMaxLen );111 // break;112 110 pBuf += num; 113 111 iTot += num; 112 // qDebug("Read %d Bytes", num); 113 // if( num == 0) { 114 // num = read( m_fd, pBuf, p_iMaxLen ); 115 // usleep(100); 116 // break; 117 // continue; 118 // } 119 // if( iTot == p_iMaxLen) { 120 // break; 121 // } 122 // } 114 123 115 // }116 124 // qDebug("Total read %d Bytes", iTot); 117 125 return iTot; 118 126 } 127 128 /** No descriptions */ 129 void AMCSerialPort::flush() 130 { 131 tcflush( m_fd, TCIOFLUSH ); 132 } -
trunk/MagicSoft/AMC/activemirrorcontrol/activemirrorcontrol/amcserialport.h
r3401 r4484 37 37 /** No descriptions */ 38 38 int readBlock( char* p_pBuffer, int p_iMaxLen ); 39 /** No descriptions */ 40 void flush(); 39 41 40 42 private: // Private attributes
Note:
See TracChangeset
for help on using the changeset viewer.