Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend max digital pulse duration #28

Merged
merged 2 commits into from
Nov 3, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -460,9 +460,10 @@ int gpio_digital_pulse(CommandRouter *cmd, int argc, const char **argv) {
return EINVAL;

duration = strtod(argv[4], nullptr);
// limit the duration to 500 ms so as not to have
// things be too slow
if (duration < 0 || duration > 500E-3) {

// allow for 3 mins which should accomodate
// any reasonable use case
if (duration < 0 || duration > 180000-3) {
hmaarrfk marked this conversation as resolved.
Show resolved Hide resolved
return EINVAL;
}

Expand Down
Loading