Commander Library - Detect empty command?

Bill Bigge (Creative Robotics?) Commander Library.

How can I detect a blank entry?.. ie where someone hits ENTER at the prompt (detect an empty command except for the \n (newline / delimiter) at the end.?

BTW.. Does anyone have any awareness of a forum which focuses on Libraries discussions, especially this Library?)

Thanks

bool Commander::hasPayload(){
//returns true if there is anything except an end of line after the command

if(dataReadIndex > 0) return true;

//if(bufferString.charAt(endIndexOfLastCommand) != endOfLineCharacter) return true;
return false;
}

Does anyone have any awareness of a forum which focuses on Libraries discussions

There is the Development/Libraries topic here. It doesn't seem to get much traffic, but that's because it doesn't get much traffic :slight_smile:

In theory, github repositories can now have "discussions", but it doesn't look like this one has anything, and you'd typically be at the mercy of the lone developer, unless it's a VERY popular repository.

Sometimes, developers are willing to have discussion-like questions submitted as "issues" in their github repository.

(The advantage of posting questions here is that MANY users and potential users may be interested in the library, the problem, or the fix. For example, this is the first I noticed the commander library.)

1 Like

Uh.. Thanks.. But did not work.
I was hoping to find a way to do something in my loop section, just before or after cmd.update()
I hoped to not have t hack the library.

Post an example of non-working code...

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.