mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-07 20:17:04 +03:00
LMS seems to handle 32 pixels screen only
This commit is contained in:
@@ -255,7 +255,7 @@ void grfe_handler( u8_t *data, int len) {
|
||||
}
|
||||
|
||||
// try to minmize I2C traffic which is very slow
|
||||
int rows = Display.Height / 8;
|
||||
int rows = (Display.Height > 32) ? 4 : Display.Height / 8;
|
||||
for (int r = 0; r < rows; r++) {
|
||||
uint8_t first = 0, last;
|
||||
uint8_t *optr = Display.Framebuffer + r*Display.Width, *iptr = data + r;
|
||||
@@ -281,12 +281,15 @@ void grfe_handler( u8_t *data, int len) {
|
||||
// to be verified, but this is as fast as using a pointer on data
|
||||
for (int i = len - 1; i >= 0; i--) data[i] = BitReverseTable256[data[i]];
|
||||
|
||||
if (Display.Height > 32) SSD1306_SetPageAddress( &Display, 0, 32/8-1);
|
||||
|
||||
// force addressing mode by columns
|
||||
if (AddressMode != AddressMode_Vertical) {
|
||||
AddressMode = AddressMode_Vertical;
|
||||
SSD1306_SetDisplayAddressMode( &Display, AddressMode );
|
||||
}
|
||||
SSD1306_WriteRawData( &Display, data, len);
|
||||
|
||||
SSD1306_WriteRawData(&Display, data, len);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ static void control_handler(void *client, button_event_e event, button_press_e p
|
||||
ESP_LOGD(TAG, "control gpio:%u press:%u long:%u event:%u action:%u", key->gpio, press, long_press, event, action);
|
||||
|
||||
if (action > ACTRLS_MAX) {
|
||||
// need to do the remap here
|
||||
// need to do the remap here using button_remap
|
||||
ESP_LOGD(TAG, "remapping buttons");
|
||||
} else if (action != ACTRLS_NONE) {
|
||||
ESP_LOGD(TAG, "calling action %u", action);
|
||||
|
||||
Reference in New Issue
Block a user