Ir reciever in an finite state machine

Greetings

fixed

Problem I need help with :

Every switch is depending on the value of the recieved Ir.code.
How do I it?

Currently using:

IRremote library API

Solution trial:

fixed

Question:

Is it fine to do it like that or is there a way smarter way ?

Other things:

If someone would check my other code I would be very thankful !

 fixed

In advance thank you for your help. Have a good day!

Yes - but what was the question?

Mark

If my solution would work if not what would work / is smarter.

Can't test my code right now.

Also does anyone know how long an ir code last if i send it with irsend.sendNEC(5,16) ?

Fixed