You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm adding matrix type to LVGL project. I added a matrix type and its c code declaration is:
typedef struct {
float m[3][3];
} lv_matrix_t;
But A type error occurred when generating the binding code of micropython. An error similar to the following:
build-standard/lvgl/lv_mpy.c:25340:28: error: expected identifier or ‘(’ before ‘[’ token
25340 | GENMPY_UNUSED STATIC float [3] *mp_arr_to_float___3____3__(mp_obj_t mp_arr)
| ^
build-standard/lvgl/lv_mpy.c:25356:70: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
25356 | GENMPY_UNUSED STATIC mp_obj_t mp_arr_from_float___3____3__(float [3] *arr)
| ^
build-standard/lvgl/lv_mpy.c: In function ‘mp_lv_matrix_t_attr’:
build-standard/lvgl/lv_mpy.c:25397:39: error: implicit declaration of function ‘mp_arr_from_float___3____3__’; did you mean ‘mp_arr_from_float___3__’? [-Werror=implicit-function-declaration]
25397 | case MP_QSTR_m: dest[0] = mp_arr_from_float___3____3__(data->m); break; // converting from float [3][3];
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| mp_arr_from_float___3__
build-standard/lvgl/lv_mpy.c:25397:37: error: assignment to ‘mp_obj_t’ {aka ‘void *’} from ‘int’ makes pointer from integer without a cast [-Werror=int-conversion]
25397 | case MP_QSTR_m: dest[0] = mp_arr_from_float___3____3__(data->m); break; // converting from float [3][3];
|
Its type becomes float[3] * , Is this a bug?
The text was updated successfully, but these errors were encountered:
I ran into this same issue today when trying to enable LV_USE_VECTOR_GRAPHIC in lv_conf.h.
The python bindings generator doesn't currently support multi-dim arrays at all. I started trying to add support in andrewleech@ac16d02 but haven't had time to finish it yet.
I'm adding matrix type to LVGL project. I added a matrix type and its c code declaration is:
But A type error occurred when generating the binding code of micropython. An error similar to the following:
Its type becomes float[3] * , Is this a bug?
The text was updated successfully, but these errors were encountered: