More testing
This commit is contained in:
@@ -9,18 +9,37 @@ void RicochetMatrix::initialize() {
|
||||
randomSeed(random(0, 10000000));
|
||||
balls[i] = new RicochetHelper(random(0, matrix->getWidth()), random(0, matrix->getHeight()),
|
||||
matrix->getWidth(), matrix->getHeight(), colors[random(0, numColors)]);
|
||||
|
||||
Serial.print("Ball ");
|
||||
Serial.println(i);
|
||||
Serial.print("X ");
|
||||
Serial.println(balls[i]->getCurrentXPos());
|
||||
Serial.print("Y ");
|
||||
Serial.println(balls[i]->getCurrentYPos());
|
||||
Serial.print("CR ");
|
||||
Serial.println(balls[i]->getCurrentColor().red);
|
||||
Serial.print("CG ");
|
||||
Serial.println(balls[i]->getCurrentColor().green);
|
||||
Serial.print("CB ");
|
||||
Serial.println(balls[i]->getCurrentColor().blue);
|
||||
}
|
||||
}
|
||||
|
||||
void RicochetMatrix::execute() {
|
||||
Serial.println("Pre Clear");
|
||||
matrix->clearLEDs();
|
||||
Serial.println("Post Clear");
|
||||
|
||||
Serial.println("Positional Updates");
|
||||
for(uint16_t i = 0; i < numBalls; i++) {
|
||||
balls[i]->updatePositions();
|
||||
|
||||
matrix->drawPixel(balls[i]->getCurrentXPos(), balls[i]->getCurrentYPos(),
|
||||
balls[i]->getCurrentColor());
|
||||
}
|
||||
Serial.println("Post Positional Updates");
|
||||
|
||||
Serial.println("Pre Request Show");
|
||||
matrix->requestShow();
|
||||
Serial.println("Post Request Show");
|
||||
}
|
||||
Reference in New Issue
Block a user