Changeset 4484 for trunk/MagicSoft


Ignore:
Timestamp:
08/04/04 16:38:55 (20 years ago)
Author:
merck
Message:
MMerck: No real modifications.
CVc: Committing in .
Location:
trunk/MagicSoft/AMC/activemirrorcontrol/activemirrorcontrol
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/AMC/activemirrorcontrol/activemirrorcontrol/amcserialport.cpp

    r3401 r4484  
    7373    newtio.c_iflag = IGNPAR | ICRNL;
    7474    newtio.c_oflag = 0;
     75//    newtio.c_oflag = OCRNL;
    7576
    7677    /* set input mode (non-canonical, no echo, ...) */
     
    8889    }
    8990
     91    fcntl( m_fd, F_SETFL, 0);
    9092    return;
    9193}
     
    100102int AMCSerialPort::readBlock( char* p_pBuffer, int p_iMaxLen )
    101103{
     104//  usleep(1000);
    102105  int num, iTot = 0;
    103106  char* pBuf = p_pBuffer;
     
    105108//      {
    106109                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;
    112110    pBuf += num;
    113111    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//      }
    114123
    115 //      }
    116124//  qDebug("Total read %d Bytes", iTot);
    117125        return iTot;
    118126}
     127
     128/** No descriptions */
     129void AMCSerialPort::flush()
     130{
     131    tcflush( m_fd, TCIOFLUSH );
     132}
  • trunk/MagicSoft/AMC/activemirrorcontrol/activemirrorcontrol/amcserialport.h

    r3401 r4484  
    3737  /** No descriptions */
    3838  int readBlock( char* p_pBuffer, int p_iMaxLen );
     39  /** No descriptions */
     40  void flush();
    3941
    4042private: // Private attributes
Note: See TracChangeset for help on using the changeset viewer.