diff options
| author | Hosted Weblate <hosted@weblate.org> | 2021-03-03 02:01:43 +0100 |
|---|---|---|
| committer | Hosted Weblate <hosted@weblate.org> | 2021-03-03 02:01:43 +0100 |
| commit | 9a98f590e4b482d619f2ff452fef2f4eab872138 (patch) | |
| tree | 43d9ec76c6efb40318fbc812586d1c6a5bbaf38d /shared-module | |
| parent | e9bb215bc2f6cfaf11e0b072f9112dfd469fd32a (diff) | |
| parent | efc2667b5f087480b1b3233ae00ab1529a442f9f (diff) | |
Merge remote-tracking branch 'origin/main' into main
Diffstat (limited to 'shared-module')
| -rw-r--r-- | shared-module/rgbmatrix/RGBMatrix.c | 4 | ||||
| -rw-r--r-- | shared-module/rgbmatrix/RGBMatrix.h | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/shared-module/rgbmatrix/RGBMatrix.c b/shared-module/rgbmatrix/RGBMatrix.c index b8db0d893..a688d7fd6 100644 --- a/shared-module/rgbmatrix/RGBMatrix.c +++ b/shared-module/rgbmatrix/RGBMatrix.c @@ -56,7 +56,7 @@ void common_hal_rgbmatrix_rgbmatrix_construct(rgbmatrix_rgbmatrix_obj_t *self, i self->tile = tile; self->serpentine = serpentine; - self->timer = timer ? timer : common_hal_rgbmatrix_timer_allocate(); + self->timer = timer ? timer : common_hal_rgbmatrix_timer_allocate(self); if (self->timer == NULL) { mp_raise_ValueError(translate("No timer available")); } @@ -68,6 +68,8 @@ void common_hal_rgbmatrix_rgbmatrix_construct(rgbmatrix_rgbmatrix_obj_t *self, i } void common_hal_rgbmatrix_rgbmatrix_reconstruct(rgbmatrix_rgbmatrix_obj_t* self, mp_obj_t framebuffer) { + self->paused = 1; + common_hal_rgbmatrix_timer_disable(self->timer); if (framebuffer) { self->framebuffer = framebuffer; diff --git a/shared-module/rgbmatrix/RGBMatrix.h b/shared-module/rgbmatrix/RGBMatrix.h index 4a0e9235e..65bfc9799 100644 --- a/shared-module/rgbmatrix/RGBMatrix.h +++ b/shared-module/rgbmatrix/RGBMatrix.h @@ -26,6 +26,7 @@ #pragma once +#include "py/obj.h" #include "lib/protomatter/src/core.h" extern const mp_obj_type_t rgbmatrix_RGBMatrix_type; |
