tab size, m_errorCount
This commit is contained in:
parent
a18234f696
commit
8b34b562f8
@ -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);
|
||||
|
@ -81,6 +81,7 @@ private:
|
||||
uint8_t m_recvBuffer[RECEIVE_BUFFER_SIZE];
|
||||
bool m_sampling;
|
||||
bool m_calibration;
|
||||
uint16_t m_errorCount;
|
||||
void prepareResponse(bool err, uint8_t in);
|
||||
void sample();
|
||||
void hold();
|
||||
|
Loading…
x
Reference in New Issue
Block a user