Update IO_HALDisplay.h

Enable I2C address overlap check on HAL display.
This commit is contained in:
Neil McKechnie 2023-03-09 15:59:52 +00:00
parent 59c6c1e5af
commit 679e5885c4
1 changed files with 2 additions and 2 deletions

View File

@ -82,10 +82,10 @@ private:
public:
// Static function to handle "HALDisplay::create(...)" calls.
static void create(I2CAddress i2cAddress, int width, int height) {
/* if (checkNoOverlap(i2cAddress)) */ new HALDisplay(0, i2cAddress, width, height);
if (checkNoOverlap(0, 0, i2cAddress)) new HALDisplay(0, i2cAddress, width, height);
}
static void create(uint8_t displayNo, I2CAddress i2cAddress, int width, int height) {
/* if (checkNoOverlap(i2cAddress)) */ new HALDisplay(displayNo, i2cAddress, width, height);
if (checkNoOverlap(0, 0, i2cAddress)) new HALDisplay(displayNo, i2cAddress, width, height);
}
protected: