Skip to content

Commit 591dfee

Browse files
committed
sys/light_matrix: fix pbsys_hub_light_matrix_user_program_animation_next return type
This function implements typedef clock_time_t (*pbio_light_animation_next_t)(pbio_light_animation_t *animation); so the return type should be clock_time_t.
1 parent b005bfc commit 591dfee

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/pbio/sys/light_matrix.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
#include <stdbool.h>
88
#include <stdint.h>
99

10+
#include <contiki.h>
11+
1012
#include <pbdrv/led.h>
1113
#include <pbio/error.h>
1214
#include <pbio/event.h>
@@ -48,7 +50,7 @@ void pbsys_hub_light_matrix_init() {
4850
pbio_light_matrix_init(pbsys_hub_light_matrix, 5, &pbsys_hub_light_matrix_funcs);
4951
}
5052

51-
static uint32_t pbsys_hub_light_matrix_user_program_animation_next(pbio_light_animation_t *animation) {
53+
static clock_time_t pbsys_hub_light_matrix_user_program_animation_next(pbio_light_animation_t *animation) {
5254
// The indexes of pixels to light up
5355
static const uint8_t indexes[] = { 1, 2, 3, 8, 13, 12, 11, 6 };
5456

@@ -70,7 +72,7 @@ static uint32_t pbsys_hub_light_matrix_user_program_animation_next(pbio_light_an
7072
cycle += 9;
7173
}
7274

73-
return 40;
75+
return clock_from_msec(40);
7476
}
7577

7678
void pbsys_hub_light_matrix_handle_event(process_event_t event, process_data_t data) {

0 commit comments

Comments
 (0)