Skip to content

Commit

Permalink
added LED test
Browse files Browse the repository at this point in the history
  • Loading branch information
mkalkbrenner committed Feb 17, 2025
1 parent 893e59c commit cd3ad2e
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions src/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ static struct cag_option options[] = {
.access_name = "set-wifi-port",
.value_name = "VALUE",
.description = "WiFi network port (default is 3333)"},
{.identifier = 'y',
.access_letters = "y",
.access_name = "set-y-offset",
{.identifier = 'l',
.access_letters = "l",
.access_name = "led-test",
.value_name = "VALUE",
.description = "0..32"}};
.description = "run LED test"}};

void ZEDMDCALLBACK LogCallback(const char* format, va_list args, const void* pUserData)
{
Expand Down Expand Up @@ -136,6 +136,7 @@ int main(int argc, char* argv[])
const char* opt_wifi_password = NULL;
const char* opt_wifi_port = NULL;
const char* opt_y_offset = NULL;
bool opt_led_test = false;

bool has_other_options_than_h = false;
cag_option_init(&cag_context, options, CAG_ARRAY_SIZE(options), argc, argv);
Expand Down Expand Up @@ -220,6 +221,10 @@ int main(int argc, char* argv[])
opt_y_offset = cag_option_get_value(&cag_context);
has_other_options_than_h = true;
break;
case 'l':
opt_led_test = true;
has_other_options_than_h = true;
break;
}
}

Expand Down Expand Up @@ -540,7 +545,11 @@ int main(int argc, char* argv[])
if (save)
{
pZeDMD->SaveSettings();
pZeDMD->Reset();
}

if (opt_led_test)
{
pZeDMD->LedTest();
}

pZeDMD->Close();
Expand Down

0 comments on commit cd3ad2e

Please sign in to comment.