more debug msgs

main
Tom Early 4 years ago
parent 03eb2161ef
commit e4c393acb8

@ -32,6 +32,7 @@
#include <cerrno> #include <cerrno>
#include "DV3003.h" #include "DV3003.h"
#include "configure.h"
CDV3003::CDV3003(Encoding t) : type(t), fd(-1) CDV3003::CDV3003(Encoding t) : type(t), fd(-1)
{ {
@ -125,10 +126,14 @@ bool CDV3003::OpenDevice(const std::string &ttyname, int baudrate)
if (SetBaudRate(baudrate)) if (SetBaudRate(baudrate))
return true; return true;
//std::cout << "Baudrate it set to " << baudrate << std::endl; #ifdef DEBUG
std::cout << ttyname << " baudrate it set to " << baudrate << std::endl;
#endif
devicepath.assign(ttyname); devicepath.assign(ttyname);
//std::cout << "Opened " << devicepath << std::endl; #ifdef DEBUG
std::cout << "Opened " << devicepath << std::endl;
#endif
return false; return false;
} }
@ -158,8 +163,9 @@ bool CDV3003::InitDV3003()
std::cerr << "InitDV3003: invalid response to reset" << std::endl; std::cerr << "InitDV3003: invalid response to reset" << std::endl;
return true; return true;
} }
#ifdef DEBUG
//std::cout << "Successfully reset " << devicepath << std::endl; std::cout << "Successfully reset " << devicepath << std::endl;
#endif
// ********** turn off parity ********* // ********** turn off parity *********
ctrlPacket.header.payload_length = htons(4); ctrlPacket.header.payload_length = htons(4);
@ -185,7 +191,9 @@ bool CDV3003::InitDV3003()
return true; return true;
} }
//std::cout << "Successfully disabled parity on " << devicepath << std::endl; #ifdef DEBUG
std::cout << "Successfully disabled parity on " << devicepath << std::endl;
#endif
// ********* Product ID and Version ************* // ********* Product ID and Version *************
ctrlPacket.header.payload_length = htons(1); ctrlPacket.header.payload_length = htons(1);
@ -262,7 +270,9 @@ bool CDV3003::ConfigureCodec(uint8_t pkt_ch, Encoding type)
std::cerr << "codec config response packet failed" << std::endl; std::cerr << "codec config response packet failed" << std::endl;
return true; return true;
}; };
//std::cout << "channel " << (unsigned int)pkt_ch << " is now configured for " << ((Encoding::dstar == type) ? "D-Star" : "DMR") << std::endl; #ifdef DEBUG
std::cout << devicepath << " channel " << (unsigned int)pkt_ch << " is now configured for " << ((Encoding::dstar == type) ? "D-Star" : "DMR") << std::endl;
#endif
return false; return false;
} }

Loading…
Cancel
Save

Powered by TurnKey Linux.