What is the problem?- you said it's fixed if you put 0x in the switch...case, and you have control over what you write in the sketch, so why not just do that?
What you get, when you press a button on the remote, is a numeric value. How you print that value has no bearing on how you present the same value to the compiler. That you don't print the 0x doesn't mean anything to us.
Hello, I'm going to explain it again.. I have ir remote controler without documentation and I loaded program that prints me certain characters when i press specific button on remote. Then i put given value in case statement. If I put 0x in front , case function wont work because it receives it without 0x..
On some remotes it works, on some it does not..
How can I solve this?
and I loaded program that prints me certain characters when i press specific button on remote.
So where IS that code?
If I put 0x in front , case function wont work because it receives it without 0x..
It received a number. You do NOT know that the number was in HEX format. For all you know, it was in base 27 format. Then, you printed that number in base 16 format, and the printing function did not add the 0x prefix BECAUSE THAT IS A COMPILER DIRECTIVE.
Why don't you make life easy for yourself, and print the number in a way that you AND the compiler like?
Serial.println(results.value);
It's past time that you learned the difference between the assignment operator (=) and the equality operator (==) and that they are NOT interchangeable.