--- branches/linux-serial/H7Serial.cpp 2007/02/04 23:11:02 46 +++ branches/linux-serial/H7Serial.cpp 2007/02/05 10:24:24 56 @@ -1,7 +1,5 @@ -#ifdef _WINDOWS -#include "StdAfx.h" -#endif +#include "stdafx.h" #include "H7Serial.h" #include @@ -12,7 +10,7 @@ { } -CH7Serial::CH7Serial(char* port, int bitrate) +CH7Serial::CH7Serial(char* port, Baudrate bitrate) : CSlipSerial(port, bitrate) { } @@ -24,17 +22,14 @@ short CH7Serial::readTarget(unsigned char target) { using namespace std; - cout << "read start" << endl; short retval; unsigned char frame[1]; unsigned char hi_target = (target & 0x0F) << 4; frame[0] = hi_target | 0x00; writeFrame(frame,1); - cout << "read mid" << endl; Sleep(50); //be nice and wait a little std::vector answer = readFrame(); - cout << "read done" << endl; if (answer.size() == 0) throw std::runtime_error("No reply"); @@ -62,14 +57,11 @@ unsigned char hi_target = (target & 0x0F) << 4; frame[0] = hi_target | 0x01; frame[1] = data; - cout << "write start" << endl; writeFrame(frame,2); - cout << "write mid" << endl; Sleep(50); //be nice and wait a little std::vector answer = readFrame(); - cout << "write stop" << endl; if (answer.size() == 0) throw std::runtime_error("No reply");