@@ -106,11 +106,11 @@ float MCP9600::getTempDelta(bool units){
106106
107107signed long MCP9600::getRawADC (){
108108 for (byte attempts; attempts <= retryAttempts; attempts++){
109- _i2cPort->beginTransmission (DEV_ADDR );
109+ _i2cPort->beginTransmission (_deviceAddress );
110110 _i2cPort->write (RAW_ADC);
111111 _i2cPort->endTransmission ();
112112
113- if (_i2cPort->requestFrom (DEV_ADDR , 3 ) != 0 ){
113+ if (_i2cPort->requestFrom (_deviceAddress , 3 ) != 0 ){
114114 signed long data = _i2cPort->read () << 16 ;
115115 data |= _i2cPort->read () << 8 ;
116116 data |= _i2cPort->read ();
@@ -514,10 +514,10 @@ uint8_t MCP9600::readSingleRegister(MCP9600_Register reg){
514514 // This attempts to fix the bug where clock stretching sometimes failes, as
515515 // described in the MCP9600 eratta
516516 for (uint8_t attempts; attempts <= retryAttempts; attempts++){
517- _i2cPort->beginTransmission (DEV_ADDR );
517+ _i2cPort->beginTransmission (_deviceAddress );
518518 _i2cPort->write (reg);
519519 _i2cPort->endTransmission ();
520- if (_i2cPort->requestFrom (DEV_ADDR , 1 ) != 0 ){
520+ if (_i2cPort->requestFrom (_deviceAddress , 1 ) != 0 ){
521521 return _i2cPort->read ();
522522 }
523523 }
@@ -528,11 +528,11 @@ uint16_t MCP9600::readDoubleRegister(MCP9600_Register reg){
528528 // This attempts to fix the bug where clock stretching sometimes failes, as
529529 // described in the MCP9600 eratta
530530 for (byte attempts; attempts <= retryAttempts; attempts++){
531- _i2cPort->beginTransmission (DEV_ADDR );
531+ _i2cPort->beginTransmission (_deviceAddress );
532532 _i2cPort->write (reg);
533533 _i2cPort->endTransmission ();
534534
535- if (_i2cPort->requestFrom (DEV_ADDR , 2 ) != 0 ){
535+ if (_i2cPort->requestFrom (_deviceAddress , 2 ) != 0 ){
536536 uint16_t data = _i2cPort->read () << 8 ;
537537 data |= _i2cPort->read ();
538538 return data;
0 commit comments