improve rerender logics
Some checks failed
Arduino Pong CI / build (macos-latest) (push) Has been cancelled
Arduino Pong CI / build (ubuntu-latest) (push) Has been cancelled
Arduino Pong CI / build (windows-latest) (push) Has been cancelled

This commit is contained in:
andrea
2026-03-15 20:23:52 +01:00
parent 7c065d8799
commit fec4db0c5d
7 changed files with 19 additions and 18 deletions

View File

@@ -1,9 +1,7 @@
#include <Arduino.h>
#include "config.h"
void render_matrix(byte frame[MATRIX_HEIGHT][MATRIX_WIDTH], int p1_start, int p2_start, int &need_refresh, int ball_x, int ball_y) {
if (!need_refresh) return;
need_refresh= 0;
void render_matrix(byte frame[MATRIX_HEIGHT][MATRIX_WIDTH], int p1_start, int p2_start, int ball_x, int ball_y) {
// clear
for (int x=0; x < MATRIX_WIDTH; x++) {
for (int y=0; y < MATRIX_HEIGHT; y++) {