182 } |
181 } |
183 if (Backlight > 0) { |
182 if (Backlight > 0) { |
184 Backlight--; |
183 Backlight--; |
185 } |
184 } |
186 |
185 |
|
186 piLock(LOCK_MENU); |
187 if (setupmenu != MENU_NONE) { |
187 if (setupmenu != MENU_NONE) { |
188 if (menutimer < MENU_TIMEOUT) |
188 if (menutimer < MENU_TIMEOUT) |
189 menutimer++; |
189 menutimer++; |
190 else { |
190 else { |
191 setupmenu = MENU_NONE; |
191 setupmenu = MENU_NONE; |
192 if (current_unit) |
|
193 free(current_unit); |
|
194 current_unit = NULL; |
|
195 } |
192 } |
196 } |
193 } |
|
194 piUnlock(LOCK_MENU); |
197 } |
195 } |
198 } |
196 } |
199 |
197 |
200 /* |
198 /* |
201 * Loop 10 milliseconds |
199 * Loop 10 milliseconds |