@@ -217,8 +217,8 @@ STATIC mp_obj_t common_Lightmatrix_number(size_t n_args, const mp_obj_t *pos_arg
217
217
}
218
218
STATIC MP_DEFINE_CONST_FUN_OBJ_KW (common_Lightmatrix_number_obj , 1 , common_Lightmatrix_number );
219
219
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 ) {
222
222
PB_PARSE_ARGS_METHOD (n_args , pos_args , kw_args ,
223
223
common_Lightmatrix_obj_t , self ,
224
224
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
235
235
pb_assert (PBIO_ERROR_INVALID_ARG );
236
236
}
237
237
238
- // Allocate pattern data
238
+ // Allocate animation data
239
239
size_t size = pbio_light_matrix_get_size (self -> light_matrix );
240
240
common_Lightmatrix__renew (self , n );
241
241
242
- // Extract pattern data
242
+ // Extract animation data
243
243
for (uint8_t i = 0 ; i < n ; i ++ ) {
244
244
common_Lightmatrix_image__extract (image_objs [i ], size , self -> data + size * size * i );
245
245
}
246
246
247
- // Activate the pattern
247
+ // Activate the animation
248
248
pbio_light_matrix_start_animation (self -> light_matrix , self -> data , self -> frames , interval );
249
249
return mp_const_none ;
250
250
}
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 );
252
252
253
253
// pybricks._common.LightMatrix.pixel
254
254
STATIC 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[] = {
309
309
{ MP_ROM_QSTR (MP_QSTR_number ), MP_ROM_PTR (& common_Lightmatrix_number_obj ) },
310
310
{ MP_ROM_QSTR (MP_QSTR_off ), MP_ROM_PTR (& common_Lightmatrix_off_obj ) },
311
311
{ 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 ) },
313
313
{ MP_ROM_QSTR (MP_QSTR_pixel ), MP_ROM_PTR (& common_Lightmatrix_pixel_obj ) },
314
314
{ MP_ROM_QSTR (MP_QSTR_orientation ), MP_ROM_PTR (& common_Lightmatrix_orientation_obj ) },
315
315
{ MP_ROM_QSTR (MP_QSTR_text ), MP_ROM_PTR (& common_Lightmatrix_text_obj ) },
0 commit comments