Merge pull request #2120 from kwagyeman/kwabena/patch

modules/py_fir: Fix mlx data root pointer.
This commit is contained in:
Ibrahim Abdelkader 2024-01-31 16:34:27 +02:00 committed by GitHub
commit cc92586b05
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -309,7 +309,6 @@ static mp_obj_t py_fir_deinit() {
#if ((OMV_ENABLE_FIR_MLX90621 == 1) || (OMV_ENABLE_FIR_MLX90640 == 1) || (OMV_ENABLE_FIR_MLX90641 == 1))
if (fir_mlx_data != NULL) {
xfree(fir_mlx_data);
fir_mlx_data = NULL;
}
#endif
@ -1161,5 +1160,8 @@ void py_fir_init0() {
py_fir_deinit();
}
#if ((OMV_ENABLE_FIR_MLX90621 == 1) || (OMV_ENABLE_FIR_MLX90640 == 1) || (OMV_ENABLE_FIR_MLX90641 == 1))
MP_REGISTER_ROOT_POINTER(void *fir_mlx_data);
#endif
MP_REGISTER_MODULE(MP_QSTR_fir, fir_module);
#endif