File tree Expand file tree Collapse file tree 9 files changed +28
-44
lines changed Expand file tree Collapse file tree 9 files changed +28
-44
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 1111
1212#include <stdint.h>
1313
14+ #include <pbdrv/led.h>
15+
1416#include <pbio/config.h>
1517#include <pbio/error.h>
1618#include <pbio/geometry.h>
19+ #include <pbio/light_animation.h>
1720
1821/** A light matrix instance. */
19- typedef struct _pbio_light_matrix_t pbio_light_matrix_t ;
22+ typedef struct {
23+ /** Animation instance for background animation. */
24+ pbio_light_animation_t animation ;
25+ /** Animation cell data. */
26+ const uint8_t * animation_cells ;
27+ /** The number of cells in @p animation_cells */
28+ uint8_t num_animation_cells ;
29+ /** The index of the currently displayed animation cell. */
30+ uint8_t current_cell ;
31+ /** Animation update rate in milliseconds. */
32+ uint16_t interval ;
33+ /** Size of the matrix (assumes matrix is square). */
34+ uint8_t size ;
35+ /** Orientation of the matrix: which side is "up". */
36+ pbio_geometry_side_t up_side ;
37+ /** The driver for this light matrix. */
38+ pbdrv_led_array_dev_t * led_array_dev ;
39+ } pbio_light_matrix_t ;
2040
2141#if PBIO_CONFIG_LIGHT_MATRIX
2242
Original file line number Diff line number Diff line change 1212
1313#include <pbio/util.h>
1414
15- #include "animation.h"
15+ #include <pbio/light_animation.h>
1616
1717/**
1818 * This is used as a value for the next_animation field to indicate when an
Original file line number Diff line number Diff line change 1414#include <pbio/light.h>
1515#include <pbio/util.h>
1616
17- #include "animation.h"
17+ #include <pbio/light_animation.h>
1818#include "color_light.h"
1919
2020/**
Original file line number Diff line number Diff line change 77#include <pbio/error.h>
88#include <pbio/light.h>
99
10- #include "animation.h"
10+ #include <pbio/light_animation.h>
1111
1212#ifndef _PBIO_LIGHT_COLOR_LIGHT_H_
1313#define _PBIO_LIGHT_COLOR_LIGHT_H_
Original file line number Diff line number Diff line change 1111#include <pbio/light_matrix.h>
1212#include <pbio/util.h>
1313
14- #include "animation.h"
15- #include " light_matrix.h"
14+ #include <pbio/light_animation.h>
15+ #include <pbio/ light_matrix.h>
1616
1717static pbio_light_matrix_t light_matrices [PBIO_CONFIG_LIGHT_MATRIX_NUM_DEV ];
1818
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1515#include <pbio/battery.h>
1616#include <pbio/image.h>
1717#include <pbio/imu.h>
18+ #include <pbio/light_animation.h>
1819#include <pbio/motor_process.h>
1920#include <pbio/port_interface.h>
2021
21- #include "light/animation.h"
22-
2322/**
2423 * Initialize the Pybricks I/O Library. This function must be called once,
2524 * usually at the beginning of a program, before using any other functions in
Original file line number Diff line number Diff line change 1818#include <pbsys/config.h>
1919#include <pbsys/status.h>
2020
21- #include "../src/light/ light_matrix.h"
21+ #include <pbio/ light_matrix.h>
2222#include "hmi.h"
2323
2424#if PBSYS_CONFIG_HUB_LIGHT_MATRIX
You can’t perform that action at this time.
0 commit comments