Merge pull request #1727 from kwagyeman/kwabena/lcd_vflip_error_note

imlib: Add error note about vflip on lcd display.
This commit is contained in:
Ibrahim Abdelkader 2022-09-26 16:12:30 +02:00 committed by GitHub
commit d6f02d5a39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1663,6 +1663,10 @@ STATIC mp_obj_t py_lcd_display(uint n_args, const mp_obj_t *args, mp_map_t *kw_a
if ((!got_x_scale) && (!got_x_size) && got_y_size) arg_x_scale = arg_y_scale;
if ((!got_y_scale) && (!got_y_size) && got_x_size) arg_y_scale = arg_x_scale;
if ((!lcd_triple_buffer) && (arg_y_scale < 0)) {
mp_raise_msg(&mp_type_ValueError, MP_ERROR_TEXT("Vertical flip requires triple buffering!"));
}
switch (lcd_type) {
#ifdef OMV_SPI_LCD_CONTROLLER
case LCD_SHIELD: {