clamg-format - new code

This commit is contained in:
Graeme Winter 2021-04-16 06:13:36 +01:00
parent 4a0523ef1e
commit d5e9dd001e
1 changed files with 80 additions and 83 deletions

View File

@ -54,15 +54,14 @@ mp_obj_t picoscroll_set_pixel(mp_obj_t x_obj, mp_obj_t y_obj, mp_obj_t v_obj) {
else
scroll->set_pixel(x, y, val);
}
}
else
} else
mp_raise_msg(&mp_type_RuntimeError, NOT_INITIALISED_MSG);
return mp_const_none;
}
mp_obj_t picoscroll_show_text(mp_obj_t text_obj, mp_obj_t brightness_obj, mp_obj_t offset_obj) {
mp_obj_t picoscroll_show_text(mp_obj_t text_obj, mp_obj_t brightness_obj,
mp_obj_t offset_obj) {
if (scroll != nullptr) {
mp_buffer_info_t bufinfo;
unsigned char *buffer;
@ -110,8 +109,6 @@ mp_obj_t picoscroll_set_pixel(mp_obj_t x_obj, mp_obj_t y_obj, mp_obj_t v_obj) {
return mp_const_none;
}
mp_obj_t picoscroll_set_pixels(mp_obj_t image_obj) {
if (scroll != nullptr) {
mp_buffer_info_t bufinfo;
@ -129,14 +126,14 @@ mp_obj_t picoscroll_set_pixels(mp_obj_t image_obj) {
scroll->set_pixel(x, y, val);
}
}
}
else
} else
mp_raise_msg(&mp_type_RuntimeError, NOT_INITIALISED_MSG);
return mp_const_none;
}
mp_obj_t picoscroll_show_bitmap_1d(mp_obj_t bitmap_obj, mp_obj_t brightness_obj, mp_obj_t offset_obj) {
mp_obj_t picoscroll_show_bitmap_1d(mp_obj_t bitmap_obj, mp_obj_t brightness_obj,
mp_obj_t offset_obj) {
if (scroll != nullptr) {
mp_buffer_info_t bufinfo;
mp_get_buffer_raise(bitmap_obj, &bufinfo, MP_BUFFER_RW);