@@ -217,8 +217,8 @@ STATIC mp_obj_t common_Lightmatrix_number(size_t n_args, const mp_obj_t *pos_arg
217217}
218218STATIC MP_DEFINE_CONST_FUN_OBJ_KW (common_Lightmatrix_number_obj , 1 , common_Lightmatrix_number );
219219
220- // pybricks._common.LightMatrix.pattern
221- STATIC mp_obj_t common_Lightmatrix_pattern (size_t n_args , const mp_obj_t * pos_args , mp_map_t * kw_args ) {
220+ // pybricks._common.LightMatrix.animate
221+ STATIC mp_obj_t common_Lightmatrix_animate (size_t n_args , const mp_obj_t * pos_args , mp_map_t * kw_args ) {
222222 PB_PARSE_ARGS_METHOD (n_args , pos_args , kw_args ,
223223 common_Lightmatrix_obj_t , self ,
224224 PB_ARG_REQUIRED (images ),
@@ -235,20 +235,20 @@ STATIC mp_obj_t common_Lightmatrix_pattern(size_t n_args, const mp_obj_t *pos_ar
235235 pb_assert (PBIO_ERROR_INVALID_ARG );
236236 }
237237
238- // Allocate pattern data
238+ // Allocate animation data
239239 size_t size = pbio_light_matrix_get_size (self -> light_matrix );
240240 common_Lightmatrix__renew (self , n );
241241
242- // Extract pattern data
242+ // Extract animation data
243243 for (uint8_t i = 0 ; i < n ; i ++ ) {
244244 common_Lightmatrix_image__extract (image_objs [i ], size , self -> data + size * size * i );
245245 }
246246
247- // Activate the pattern
247+ // Activate the animation
248248 pbio_light_matrix_start_animation (self -> light_matrix , self -> data , self -> frames , interval );
249249 return mp_const_none ;
250250}
251- STATIC MP_DEFINE_CONST_FUN_OBJ_KW (common_Lightmatrix_pattern_obj , 1 , common_Lightmatrix_pattern );
251+ STATIC MP_DEFINE_CONST_FUN_OBJ_KW (common_Lightmatrix_animate_obj , 1 , common_Lightmatrix_animate );
252252
253253// pybricks._common.LightMatrix.pixel
254254STATIC mp_obj_t common_Lightmatrix_pixel (size_t n_args , const mp_obj_t * pos_args , mp_map_t * kw_args ) {
@@ -309,7 +309,7 @@ STATIC const mp_rom_map_elem_t common_Lightmatrix_locals_dict_table[] = {
309309 { MP_ROM_QSTR (MP_QSTR_number ), MP_ROM_PTR (& common_Lightmatrix_number_obj ) },
310310 { MP_ROM_QSTR (MP_QSTR_off ), MP_ROM_PTR (& common_Lightmatrix_off_obj ) },
311311 { MP_ROM_QSTR (MP_QSTR_on ), MP_ROM_PTR (& common_Lightmatrix_on_obj ) },
312- { MP_ROM_QSTR (MP_QSTR_pattern ), MP_ROM_PTR (& common_Lightmatrix_pattern_obj ) },
312+ { MP_ROM_QSTR (MP_QSTR_animate ), MP_ROM_PTR (& common_Lightmatrix_animate_obj ) },
313313 { MP_ROM_QSTR (MP_QSTR_pixel ), MP_ROM_PTR (& common_Lightmatrix_pixel_obj ) },
314314 { MP_ROM_QSTR (MP_QSTR_orientation ), MP_ROM_PTR (& common_Lightmatrix_orientation_obj ) },
315315 { MP_ROM_QSTR (MP_QSTR_text ), MP_ROM_PTR (& common_Lightmatrix_text_obj ) },
0 commit comments