Same as fill_grid_pixels but does each pixel individually So it's much slower because it has to send 306 I2C commands
(grid: &Grid, matrix: &mut Foo)
| 308 | /// Same as fill_grid_pixels but does each pixel individually |
| 309 | /// So it's much slower because it has to send 306 I2C commands |
| 310 | pub fn _fill_grid(grid: &Grid, matrix: &mut Foo) { |
| 311 | for y in 0..HEIGHT { |
| 312 | for x in 0..WIDTH { |
| 313 | matrix.device.pixel(x as u8, y as u8, grid.0[x][y]).unwrap(); |
| 314 | } |
| 315 | } |
| 316 | } |
| 317 | |
| 318 | pub fn set_brightness(state: &mut LedmatrixState, brightness: u8, matrix: &mut Foo) { |
| 319 | state.brightness = brightness; |