|
SegLCDLib
|
This guide documents user-visible changes required when upgrading between SegLCDLib versions.
Migration checklist:
LCD constructors no longer take Arduino Wire or GPIO pins directly. Create a transport object and pass it to the LCD class.
Old:
New:
For 3-wire controllers:
This affects all existing v0.0.1 LCD constructors:
TwoWire& to SegTransportI2C&SegTransport3Wire& plus chip-selectThe generic SegLCD_PCx85_Raw class was replaced by controller-specific raw classes.
Old:
New for PCF85176/PCF8576:
Use SegLCD_PCF85134_Raw for PCF85134 displays.
Physical measurement indicators were renamed from labels to units.
| v0.0.1 | v0.0.2 |
|---|---|
LabelFlags | UnitFlags |
setLabels(...) | setUnits(...) |
clearLabels(...) | clearUnits(...) |
LABEL_* unit constants | UNIT_* constants |
Affected LCD classes:
SegLCD_PCF85176_TempHumiditySegLCD_PCF85176_6DigitSignalBatteryProgressSegLCD_PCF85176_T1T2LcdSegLCD_PCF8576_4Seg6SegMaintSegBatUnitsSegLCD_VK0192_5DigSigBattProgress for unit indicators onlyExample:
Display text labels remain labels. For example, SegLCD_PCF85176_T1T2Lcd::setT1T2Labels(...) and HT1621 LCM label APIs are unchanged.
SegDriver_PCF85176 and SegDriver_PCF8576 moved out of SegDriver_PCx85.h into their own headers.
If user code includes controller drivers directly, update includes:
Regular LCD model headers already include the correct controller header.
Custom LCD classes derived from library drivers must be updated for the transport layer.
SegDriver_PCF85176.SegDriver_HT1621, SegDriver_HT1622, or SegDriver_VK0192.MAX_ADDRESS / MAX_HW_ADDRESS were replaced by class-scoped constants.initBacklight() no longer takes a raw GPIO pin number. Create a SegBacklight implementation and pass it in instead. The active-high flag moved to the backlight implementation's constructor.
Old:
New:
If initBacklight() was called conditionally based on a "no backlight" sentinel pin value, keep the SegBacklightArduino instance around only when a real pin is configured (see examples/HT1622/10Digit16SegmentLCD for a static-pin example, or examples/MenuControl/MenuControl.cpp for a dynamically-configured pin using new/delete).