funtional testing (#593)

functional optional moved to common location
topology signed warnings cleaned up
This commit is contained in:
Michael Miller
2022-08-12 10:44:05 -07:00
committed by GitHub
parent fe42327867
commit b32f719e95
9 changed files with 49 additions and 36 deletions
@@ -41,10 +41,13 @@ NeoMosaic <MyPanelLayout> mosaic(
void DumpMosaic()
{
int16_t totalWidth = static_cast<int16_t>(mosaic.getWidth());
int16_t totalHeight = static_cast<int16_t>(mosaic.getHeight());
Serial.println();
Serial.print("\t\t");
for (int x = 0; x < mosaic.getWidth(); x++)
for (int16_t x = 0; x < totalWidth; x++)
{
Serial.print(x);
Serial.print("\t");
@@ -52,19 +55,19 @@ void DumpMosaic()
Serial.println();
Serial.print("\t---");
for (int x = 0; x < mosaic.getWidth(); x++)
for (int16_t x = 0; x < totalWidth; x++)
{
Serial.print("--------");
}
Serial.println();
for (int y = 0; y < mosaic.getHeight(); y++)
for (int16_t y = 0; y < totalHeight; y++)
{
Serial.print(" ");
Serial.print(y);
Serial.print("\t|\t");
for (int x = 0; x < mosaic.getWidth(); x++)
for (int16_t x = 0; x < totalWidth; x++)
{
NeoTopologyHint hint = mosaic.TopologyHint(x, y);
@@ -45,10 +45,13 @@ NeoTiles <MyPanelLayout, MyTilesLayout> tiles(
void DumpTopo()
{
int16_t totalWidth = static_cast<int16_t>(tiles.getWidth());
int16_t totalHeight = static_cast<int16_t>(tiles.getHeight());
Serial.println();
Serial.print("\t\t");
for (int x = 0; x < tiles.getWidth(); x++)
for (int16_t x = 0; x < totalWidth; x++)
{
Serial.print(x);
Serial.print("\t");
@@ -56,19 +59,19 @@ void DumpTopo()
Serial.println();
Serial.print("\t---");
for (int x = 0; x < tiles.getWidth(); x++)
for (int16_t x = 0; x < totalWidth; x++)
{
Serial.print("--------");
}
Serial.println();
for (int y = 0; y < tiles.getHeight(); y++)
for (int16_t y = 0; y < totalHeight; y++)
{
Serial.print(" ");
Serial.print(y);
Serial.print("\t|\t");
for (int x = 0; x < tiles.getWidth(); x++)
for (int16_t x = 0; x < totalWidth; x++)
{
NeoTopologyHint hint = tiles.TopologyHint(x, y);
@@ -31,10 +31,13 @@ NeoTopology<MyPanelLayout> topo(PanelWidth, PanelHeight);
void DumpTopo()
{
int16_t totalWidth = static_cast<int16_t>(topo.getWidth());
int16_t totalHeight = static_cast<int16_t>(topo.getHeight());
Serial.println();
Serial.print("\t\t");
for (int x = 0; x < topo.getWidth(); x++)
for (int16_t x = 0; x < totalWidth; x++)
{
Serial.print(x);
Serial.print("\t");
@@ -42,19 +45,19 @@ void DumpTopo()
Serial.println();
Serial.print("\t--");
for (int x = 0; x < topo.getWidth(); x++)
for (int16_t x = 0; x < totalWidth; x++)
{
Serial.print("--------");
}
Serial.println();
for (int y = 0; y < topo.getHeight(); y++)
for (int16_t y = 0; y < totalHeight; y++)
{
Serial.print(" ");
Serial.print(y);
Serial.print("\t|\t");
for (int x = 0; x < topo.getWidth(); x++)
for (int16_t x = 0; x < totalWidth; x++)
{
Serial.print(topo.Map(x, y));
Serial.print("\t");