Browse Source

disable mode change during games

feature/2015
Christian Kroll 11 years ago
parent
commit
7937f86137
  1. 10
      src/uart/uart_commands.c

10
src/uart/uart_commands.c

@ -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,

Loading…
Cancel
Save