disable mode change during games

This commit is contained in:
Christian Kroll 2014-08-17 00:03:54 +02:00
parent 6c1b652d46
commit 7937f86137
1 changed files with 12 additions and 2 deletions

View File

@ -6,6 +6,10 @@
#include <avr/pgmspace.h>
#include "../config.h"
#include "../borg_hw/borg_hw.h"
#ifdef JOYSTICK_SUPPORT
#include "../joystick/joystick.h"
extern unsigned char waitForFire;
#endif
#include "../scrolltext/scrolltext.h"
#include "uart.h"
#include "uart_commands.h"
@ -91,11 +95,17 @@ void uartcmd_process(void) {
} else if (!strncmp_P(g_rx_buffer, UART_CMD_NEXT, 4)) {
uart_puts_p(UART_STR_PROMPT);
uartcmd_clear_buffer();
#ifdef JOYSTICK_SUPPORT
if (waitForFire)
#endif
longjmp(newmode_jmpbuf, mode);
} else if (!strncmp_P(g_rx_buffer, UART_CMD_PREV, 4)) {
uart_puts_p(UART_STR_PROMPT);
uartcmd_clear_buffer();
if (mode > 1) {
#ifdef JOYSTICK_SUPPORT
if (waitForFire)
#endif
longjmp(newmode_jmpbuf, mode - 2);
}
} else if (!strncmp_P(g_rx_buffer, UART_CMD_RESET,