Skip to content

Commit

Permalink
fixup! fixup! examples/lwm2m: add on/off switch object
Browse files Browse the repository at this point in the history
  • Loading branch information
leandrolanzieri committed Jan 29, 2025
1 parent d3e83fc commit fb2eaad
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions examples/lwm2m/lwm2m_cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,17 +164,17 @@ static int _parse_lwm2m_light_cmd(int argc, char **argv)
}

bool status;
if (!strcmp(argv[2], "on")) {
if (!strcmp(argv[2], "on")) {
status = true;
}
else if (!strcmp(argv[2], "off")) {
}
else if (!strcmp(argv[2], "off")) {
status = false;
}
else {
}
else {
printf("Error: light status can only be 'on' or 'off'\n");
_print_usage_lwm2m_light_cmd(argv[0]);
return 1;
}
}

uint8_t dimmer = atoi(argv[3]);

Expand Down

0 comments on commit fb2eaad

Please sign in to comment.