* Show power source type on detailed screen in soldering mode (#1708) * Update according to code review
This commit is contained in:
@@ -404,14 +404,14 @@ void OLED::setInverseDisplay(bool inverse) {
|
||||
I2C_CLASS::I2C_RegisterWrite(DEVICEADDR_OLED, 0x80, normalInverseCmd);
|
||||
}
|
||||
|
||||
// print a string to the current cursor location
|
||||
void OLED::print(const char *const str, FontStyle fontStyle) {
|
||||
// print a string to the current cursor location, len chars MAX
|
||||
void OLED::print(const char *const str, FontStyle fontStyle, uint8_t len) {
|
||||
const uint8_t *next = reinterpret_cast<const uint8_t *>(str);
|
||||
if (next[0] == 0x01) {
|
||||
fontStyle = FontStyle::LARGE;
|
||||
next++;
|
||||
}
|
||||
while (next[0]) {
|
||||
while (next[0] && len--) {
|
||||
uint16_t index;
|
||||
if (next[0] <= 0xF0) {
|
||||
index = next[0];
|
||||
|
||||
Reference in New Issue
Block a user