Possible bug with generic input patch node + pulse inputs

Trying to have a lil experiment with writing a circular buffer patch node. Unfortunately I’ve been stymied by what seems like a bug, consider the following setup:

Just reading bytes from the serial port into a buffer and then spitting them out is the intent. At the moment for clarity and to isolate my issue “circular-buffer” is just a stem that looks like this:

struct State {
};

{{ GENERATED_CODE }}

void evaluate(Context ctx) {
  typedef ValueType<input_IN>::T input_type_t;
  State* state = getState(ctx);

  if (getValue<input_READ>(ctx)) {
   Serial.println(getValue<input_READ>(ctx));
  }
}

Even though input_READ is set to “Never” in the editor the “if” block always executes for me. XOD 0.25.2, the .deb package installed on Xubuntu Linux 17.10.

GenericPatchBug.xodball (12.1 KB)

Whoops! Disregard this post, I’ve done something dumb I just realized. That’s a pulse input I should be using “isInputDirty” not “getValue.” Brain fart, not sure why I didn’t notice that I’m using the wrong call. I’ll flag for deletion :slight_smile:

1 Like

Hello. Yep, this is confusing. Thanks for pointing!

I created an issue to deal with it.

1 Like