LMS seems to handle 32 pixels screen only

This commit is contained in:
philippe44
2020-01-15 23:51:22 -08:00
parent cb7262962c
commit 3b74588741
2 changed files with 7 additions and 4 deletions

View File

@@ -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
}

View File

@@ -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);