aboutsummaryrefslogtreecommitdiff
path: root/testing/virtual.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'testing/virtual.cpp')
-rw-r--r--testing/virtual.cpp28
1 files changed, 27 insertions, 1 deletions
diff --git a/testing/virtual.cpp b/testing/virtual.cpp
index f13b2ea..168acb1 100644
--- a/testing/virtual.cpp
+++ b/testing/virtual.cpp
@@ -29,7 +29,8 @@ enum PANEL_CHAIN_TYPE
CHAIN_TOP_RIGHT_DOWN,
CHAIN_BOTTOM_LEFT_UP,
CHAIN_BOTTOM_RIGHT_UP,
- CHAIN_TOP_RIGHT_DOWN_ZZ /// ZigZag chaining. Might need a big ass cable to do this, all panels right way up.
+ CHAIN_TOP_RIGHT_DOWN_ZZ, /// ZigZag chaining. Might need a big ass cable to do this, all panels right way up.
+ CHAIN_BOTTOM_RIGHT_UP_ZZ
};
@@ -262,6 +263,18 @@ inline VirtualCoords VirtualMatrixPanelTest::getCoords_Dev(int16_t virt_x, int16
coords.y = virt_y % panelResY;
}
+
+ case CHAIN_BOTTOM_RIGHT_UP_ZZ:
+ {
+ // Right side up. Starting from top left all the way down.
+ // Connected in a Zig Zag manner = some long ass cables being used potentially
+
+ //Serial.printf("Condition 2, row %d ", row);
+ coords.x = (row*virtualResX)+virt_x;
+ coords.y = virt_y % panelResY;
+
+ }
+
@@ -425,6 +438,19 @@ main(int argc, char* argv[])
result = test.getCoords_Dev(16,64*2-1);
expected.x = 80; expected.y = 63;
std::printf("Expected physical (%d, %d) got (%d, %d).\n", expected.x, expected.y, result.x, result.y);
+
+
+
+ // CHAIN_BOTTOM_RIGHT_UP_ZZ test 4
+ result = test.getCoords_Dev(0,0);
+ expected.x = 0; expected.y = 0;
+ std::printf("Expected physical (%d, %d) got (%d, %d).\n", expected.x, expected.y, result.x, result.y);
+
+ // CHAIN_BOTTOM_RIGHT_UP_ZZ test 4
+ result = test.getCoords_Dev(63,64);
+ expected.x = 64*2-1; expected.y = 0;
+ std::printf("Expected physical (%d, %d) got (%d, %d).\n", expected.x, expected.y, result.x, result.y);
+
std::cout << "\n\n";