Summary Files Commits Branches @commit @diff @stats
path: root / src / LEDVideoWall.cpp
diff options
context:
space:
mode:
Commit8d7ec48eeeac85d005f4ab73cb7b0cc1bc2cabe4 (patch)
Author
 Syndamia <kamen@syndamia.com>
2025-07-23 14:07:14 +0300
Committer
 Syndamia <kamen@syndamia.com>
2025-07-23 14:07:14 +0300
Files611918c0ca6cd98fe44a5d2b8105d4199a8b3417 /src/LEDVideoWall.cpp
screen-generator-nemetschek-8d7ec48eeeac85d005f4ab73cb7b0cc1bc2cabe4.tar
screen-generator-nemetschek-8d7ec48eeeac85d005f4ab73cb7b0cc1bc2cabe4.tar.gz
screen-generator-nemetschek-8d7ec48eeeac85d005f4ab73cb7b0cc1bc2cabe4.zip
Parentda2ad781fd156e274ad47e38b919b7c19ae8d049 (diff)
feat(LEDVideoWall): Change panel and wall size input format
1 files changed, 12 insertions, 20 deletions
-rw-r--r--src/LEDVideoWall.cpp32
diff --git a/src/LEDVideoWall.cpp b/src/LEDVideoWall.cpp
index fc447bc..3097290 100644
--- a/src/LEDVideoWall.cpp
+++ b/src/LEDVideoWall.cpp
@@ -23,17 +23,13 @@ enum class LEDVideoWallType {
};
LEDVideoWall* LEDVideoWall::fromCommandLine() {
- mm ipanel_width = 0;
- cli::readUserInput(
+ mm ipanel_width = 0, ipanel_height = 0;
+ cli::scanTwoValues(
+ "%dx%d",
ipanel_width,
- "Enter width for a single panel (in mm): ",
- "Invalid panel width, try again!");
-
- mm ipanel_height = 0;
- cli::readUserInput(
ipanel_height,
- "Enter height for a single panel (in mm): ",
- "Invalid panel height, try again!");
+ "Enter panel size (in the format 'WIDTHxHEIGHT'): ",
+ "Invalid size, try again!");
unsigned int itype = 2;
cli::readUserInputMax(
@@ -45,17 +41,13 @@ LEDVideoWall* LEDVideoWall::fromCommandLine() {
LEDVideoWallType type = static_cast<LEDVideoWallType>(itype);
switch (type) {
case LEDVideoWallType::Freeform: {
- mm iwall_max_width = 0;
- cli::readUserInput(
- iwall_max_width,
- "Enter width for a single wall_max (in mm): ",
- "Invalid wall_max width, try again!");
-
- mm iwall_max_height = 0;
- cli::readUserInput(
- iwall_max_height,
- "Enter height for a single wall_max (in mm): ",
- "Invalid wall_max height, try again!");
+ mm iwall_max_width = 0, iwall_max_height = 0;
+ cli::scanTwoValues(
+ "%dx%d",
+ ipanel_width,
+ ipanel_height,
+ "Enter singe wall size (in the format 'WIDTHxHEIGHT'): ",
+ "Invalid size, try again!");
return LEDVideoWall::Freeform(ipanel_width, ipanel_height, iwall_max_width, iwall_max_height);
};