Skip to content

Commit 5265e25

Browse files
committed
compiles OK
1 parent d25aba8 commit 5265e25

File tree

4 files changed

+6
-45
lines changed

4 files changed

+6
-45
lines changed

platformio.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ lib_deps =
6767
stm32duino/STM32duino VL53L4CD
6868
stm32duino/STM32duino VL53L4CX
6969
adafruit/Adafruit_VL6180X
70-
adafruit/Adafruit PM25 AQI Sensor
7170
adafruit/Adafruit VEML7700 Library
7271
adafruit/Adafruit LC709203F
7372
adafruit/Adafruit LPS2X
@@ -93,6 +92,7 @@ lib_deps =
9392
https://github.com/adafruit/Adafruit_TinyUSB_Arduino.git
9493
https://github.com/adafruit/Adafruit_LED_Backpack.git
9594
https://github.com/adafruit/Adafruit_LiquidCrystal.git
95+
https://github.com/adafruit/Adafruit_PM25AQI.git
9696

9797

9898

src/components/i2c/WipperSnapper_I2C.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -840,16 +840,13 @@ bool WipperSnapper_Component_I2C::initI2CDevice(
840840
WS_DEBUG_PRINTLN("ADT7410 Initialized Successfully!");
841841
} else if (strcmp("quadalphanum", msgDeviceInitReq->i2c_device_name) == 0) {
842842
_quadAlphaNum = new WipperSnapper_I2C_Driver_Out_QuadAlphaNum(this->_i2c, i2cAddress);
843-
// TODO: Need the I2C PB H updated to call the configure function
844-
// _quadAlphaNum->ConfigureI2CBackpack()
845-
// TODO: ^ Uncomment this!
843+
// _quadAlphaNum->ConfigureI2CBackpack(msgDeviceInitReq->i2c_output_add.config.led_backpack_config);
846844
if (!_quadAlphaNum->begin()) {
847845
WS_DEBUG_PRINTLN("ERROR: Failed to initialize Quad Alphanum. Display!");
848846
_busStatusResponse =
849847
wippersnapper_i2c_v1_BusResponse_BUS_RESPONSE_DEVICE_INIT_FAIL;
850848
return false;
851849
}
852-
//drivers.push_back(_adt7410);
853850
_drivers_out.push_back(_quadAlphaNum);
854851
WS_DEBUG_PRINTLN("Quad Alphanum. Display Initialized Successfully!");
855852
} else {

src/components/i2c/drivers/WipperSnapper_I2C_Driver_Out.h

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -92,43 +92,6 @@ class WipperSnapper_I2C_Driver_Out : public WipperSnapper_I2C_Driver {
9292
// noop
9393
}
9494

95-
96-
/*!
97-
@brief High-level fn, executes a call to the appropriate driver
98-
function(s) based on the message data type to write.
99-
@param msg_backpack_write
100-
Pointer to a wippersnapper_i2c_output_LedBackpackWrite message.
101-
@returns True if the message was written successfully, False otherwise.
102-
*/
103-
bool LedBackpackWrite(
104-
wippersnapper_i2c_output_LedBackpackWrite *msg_backpack_write) {
105-
// Check if we should adjust brightness
106-
if (msg_backpack_write->adjust_brightness)
107-
SetLedBackpackBrightness((uint8_t)msg_backpack_write->brightness);
108-
109-
// Write the message to a LED backpack
110-
switch (msg_backpack_write->which_message) {
111-
case wippersnapper_i2c_output_LedBackpackWrite_text_tag:
112-
WS_DEBUG_PRINTLN("[i2c] Writing text to LED backpack...");
113-
WriteMessage(msg_backpack_write->message.text);
114-
break;
115-
case wippersnapper_i2c_output_LedBackpackWrite_number_int_tag:
116-
WS_DEBUG_PRINTLN("[i2c] Writing int to LED backpack...");
117-
WriteValue(msg_backpack_write->message.number_int);
118-
break;
119-
case wippersnapper_i2c_output_LedBackpackWrite_number_float_tag:
120-
WS_DEBUG_PRINTLN("[i2c] Writing float to LED backpack...");
121-
WriteValue(msg_backpack_write->message.number_float);
122-
break;
123-
default:
124-
WS_DEBUG_PRINTLN("[i2c] ERROR: Unable to determine LED backpack "
125-
"message type!");
126-
return false;
127-
break;
128-
}
129-
return true;
130-
}
131-
13295
};
13396

13497
#endif // WIPPERSNAPPER_I2C_DRIVER_OUT_H

src/components/i2c/drivers/WipperSnapper_I2C_Driver_Out_QuadAlphaNum.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ class WipperSnapper_I2C_Driver_Out_QuadAlphaNum : public WipperSnapper_I2C_Drive
4646
*/
4747
/*******************************************************************************/
4848
WipperSnapper_I2C_Driver_Out_QuadAlphaNum(TwoWire *i2c, uint16_t sensorAddress) : WipperSnapper_I2C_Driver_Out(i2c, sensorAddress) {
49-
// No-op constructor
49+
_i2c = i2c;
50+
_sensorAddress = sensorAddress;
5051
}
5152

5253
/*!
@@ -63,9 +64,9 @@ class WipperSnapper_I2C_Driver_Out_QuadAlphaNum : public WipperSnapper_I2C_Drive
6364
@brief Initializes the drvOutQuadAlphaNum component and begins I2C.
6465
@returns True if initialized successfully, False otherwise.
6566
*/
66-
bool begin() override {
67+
bool begin() {
6768
_alpha4 = new Adafruit_AlphaNum4();
68-
bool did_begin = _alpha4->begin(_address, _i2c);
69+
bool did_begin = _alpha4->begin(_sensorAddress, _i2c);
6970
_alpha4->setBrightness(_brightness);
7071
return did_begin;
7172
}

0 commit comments

Comments
 (0)