-4

I have an issue with my code, I have used Infrared Control in the past, but this time I'm 'nesting' it, so it could work like a menu. However I'm not entering the IF loop at line 84, can anybody see any issues? Thanks in advance.

http://pastebin.com/jNiL6m4X

Note that the exact same if loop is used at line 61 where it does work

Vince-Rdv
  • 29
  • 1
  • 8

1 Answers1

0

First, have you checked if at line 71, resultCode actually is BUTTON_CHMI? Otherwise you won't even enter the first switch-statement.

Second, from line 93 onwards, you have a switch-statement with several CASE-entries, and each of them lacks a break; hence, regardless of which CASE'-statement applies, you may fall intoBUTTON_BACK`, where the exit condition is set to true; I suppose you will always exit the menu, regardless which button you press.

Stephan Lechner
  • 34,891
  • 4
  • 35
  • 58