Can anyone explain why the following:
if (waitNext) {
Serial.print("\nIt Changed!");
}
else
{
Serial.print("\nNo Change!");
}
sprintf(outdex, "\nprocessCC:(%X) (%X) waitNext: %s", cc, val, waitNext ? "true" : "false");
Serial.print(outdex);
if (waitNext) {
Serial.print("\nIt Changed!");
}
else
{
Serial.print("\nNo Change!");
}
results in the following output?
No Change!
processCC:(6B) (0) waitNext: false
It Changed!
It seems that the ternary operator changed the value, but I thought this was a standard usage for printing a bool.