clamg-format - new code
This commit is contained in:
parent
4a0523ef1e
commit
d5e9dd001e
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue