tab size, m_errorCount
This commit is contained in:
@ -140,11 +140,11 @@ MeterBusMaster::MeterBusMaster() : m_sendOctets(this), m_measureCurrent(this),
|
||||
m_calibrationSupport(this),
|
||||
m_cmdReadyToSend(false), m_cmdReadyFromRecv(false), m_expectResponse(false),
|
||||
m_sendBufLen(0), m_recvBufLen(0), m_retransmitCount(0), m_token(0),
|
||||
m_responseCallback(0), m_sampling(true), m_calibration(false) {
|
||||
pinMode(RX_EN_PIN, OUTPUT);
|
||||
digitalWrite(RX_EN_PIN, RX_DISABLE);
|
||||
Serial3.begin(2400);
|
||||
UART2_C1 |= UART_C1_PE | UART_C1_M;
|
||||
m_responseCallback(0), m_sampling(true), m_calibration(false), m_errorCount(0) {
|
||||
pinMode(RX_EN_PIN, OUTPUT);
|
||||
digitalWrite(RX_EN_PIN, RX_DISABLE);
|
||||
Serial3.begin(2400);
|
||||
UART2_C1 |= UART_C1_PE | UART_C1_M;
|
||||
|
||||
|
||||
}
|
||||
@ -176,6 +176,8 @@ void MeterBusMaster::prepareResponse(bool err, uint8_t in) {
|
||||
|
||||
//Serial << "r0" << endl;
|
||||
if (err) {
|
||||
m_errorCount++;
|
||||
|
||||
//Serial << "r1" << endl;
|
||||
if (m_responseCallback != 0) {
|
||||
m_responseCallback->sendError(1, m_token, m_name);
|
||||
|
Reference in New Issue
Block a user