Merge pull request #121 from oliverschmidt/master
Several minor adjustments.
This commit is contained in:
commit
c7f986faf5
4 changed files with 39 additions and 39 deletions
|
@ -70,9 +70,9 @@ static struct ctk_button savebutton =
|
|||
static struct ctk_button cancelbutton =
|
||||
{CTK_BUTTON(20, 13, 6, "Cancel")};
|
||||
|
||||
PROCESS(dhcp_process, "IP Config");
|
||||
PROCESS(ipconfig_process, "IP config");
|
||||
|
||||
AUTOSTART_PROCESSES(&dhcp_process);
|
||||
AUTOSTART_PROCESSES(&ipconfig_process);
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
static char *
|
||||
|
@ -170,15 +170,15 @@ static void
|
|||
app_quit(void)
|
||||
{
|
||||
ctk_window_close(&window);
|
||||
process_exit(&dhcp_process);
|
||||
process_exit(&ipconfig_process);
|
||||
LOADER_UNLOAD();
|
||||
}
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
PROCESS_THREAD(dhcp_process, ev, data)
|
||||
PROCESS_THREAD(ipconfig_process, ev, data)
|
||||
{
|
||||
PROCESS_BEGIN();
|
||||
|
||||
ctk_window_new(&window, 29, 14, "IP Config");
|
||||
ctk_window_new(&window, 29, 14, "IP config");
|
||||
|
||||
CTK_WIDGET_ADD(&window, &requestbutton);
|
||||
CTK_WIDGET_ADD(&window, &statuslabel);
|
||||
|
@ -200,7 +200,7 @@ PROCESS_THREAD(dhcp_process, ev, data)
|
|||
ctk_window_open(&window);
|
||||
|
||||
/* Allow resolver to set DNS server address. */
|
||||
process_post(PROCESS_CURRENT(), PROCESS_EVENT_MSG, NULL);
|
||||
PROCESS_PAUSE();
|
||||
|
||||
dhcpc_init(uip_ethaddr.addr, sizeof(uip_ethaddr.addr));
|
||||
|
||||
|
|
|
@ -51,9 +51,9 @@ ifdef PLATFORM_BUILD
|
|||
CONTIKI_TARGET_SOURCEFILES += dll-loader.c
|
||||
CFLAGS += -DPLATFORM_BUILD -DWITH_GUI -DWITH_LOADER_ARCH -DAUTOSTART_ENABLE
|
||||
LDFLAGS += -Wl,--out-implib=contiki-main.$(TARGET).a \
|
||||
-u _cfs_open -u _cfs_opendir -u _uiplib_ipaddrconv
|
||||
-u _cfs_open -u _cfs_opendir -u _uiplib_ip4addrconv
|
||||
LINKFLAGS = -implib:contiki-main.$(TARGET).a $(OBJECTDIR)/program-handler.o \
|
||||
-include:_cfs_open -include:_cfs_opendir -include:_uiplib_ipaddrconv
|
||||
-include:_cfs_open -include:_cfs_opendir -include:_uiplib_ip4addrconv
|
||||
else
|
||||
CONTIKI_TARGET_SOURCEFILES += unload.c
|
||||
endif
|
||||
|
|
|
@ -50,11 +50,11 @@ typedef unsigned short uip_stats_t;
|
|||
|
||||
#define UIP_CONF_MAX_CONNECTIONS 40
|
||||
#define UIP_CONF_MAX_LISTENPORTS 40
|
||||
#define UIP_CONF_BUFFER_SIZE 420
|
||||
#define UIP_CONF_BUFFER_SIZE 1514
|
||||
#define UIP_CONF_BYTE_ORDER UIP_LITTLE_ENDIAN
|
||||
#define UIP_CONF_TCP_SPLIT 1
|
||||
#if UIP_CONF_IPV6
|
||||
#define UIP_CONF_IP_FORWARD 0
|
||||
#define UIP_CONF_IP_FORWARD 0
|
||||
#define UIP_CONF_DS6_NBR_NBU 100
|
||||
#define UIP_CONF_DS6_DEFRT_NBU 2
|
||||
#define UIP_CONF_DS6_PREFIX_NBU 5
|
||||
|
@ -74,16 +74,16 @@ typedef unsigned short uip_stats_t;
|
|||
|
||||
#include "ctk/ctk-console.h"
|
||||
|
||||
#define CH_ULCORNER 0xDA
|
||||
#define CH_URCORNER 0xBF
|
||||
#define CH_LLCORNER 0xC0
|
||||
#define CH_LRCORNER 0xD9
|
||||
#define CH_ENTER '\r'
|
||||
#define CH_DEL '\b'
|
||||
#define CH_CURS_UP -1
|
||||
#define CH_CURS_LEFT -2
|
||||
#define CH_CURS_RIGHT -3
|
||||
#define CH_CURS_DOWN -4
|
||||
#define CH_ULCORNER '+'
|
||||
#define CH_URCORNER '+'
|
||||
#define CH_LLCORNER '+'
|
||||
#define CH_LRCORNER '+'
|
||||
#define CH_ENTER '\r'
|
||||
#define CH_DEL '\b'
|
||||
#define CH_CURS_UP -1
|
||||
#define CH_CURS_LEFT -2
|
||||
#define CH_CURS_RIGHT -3
|
||||
#define CH_CURS_DOWN -4
|
||||
|
||||
#define CTK_CONF_MENU_KEY -5 /* F10 */
|
||||
#define CTK_CONF_WINDOWSWITCH_KEY -6 /* Ctrl-Tab */
|
||||
|
|
|
@ -112,8 +112,8 @@ console_init(void)
|
|||
SetConsoleCtrlHandler(ctrlhandler, TRUE);
|
||||
atexit(console_exit);
|
||||
|
||||
memset(blank, ' ', sizeof(blank));
|
||||
memset(hline, 0xC4, sizeof(hline));
|
||||
memset(blank, ' ', sizeof(blank));
|
||||
memset(hline, '-', sizeof(hline));
|
||||
}
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
void
|
||||
|
@ -159,8 +159,8 @@ static void
|
|||
setcolor(void)
|
||||
{
|
||||
SetConsoleTextAttribute(stdouthandle, (WORD)(reversed? (color & 0x0F) << 4 |
|
||||
(color & 0xF0) >> 4
|
||||
: color));
|
||||
(color & 0xF0) >> 4
|
||||
: color));
|
||||
}
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
unsigned char
|
||||
|
@ -264,7 +264,7 @@ cvline(unsigned char length)
|
|||
y = wherey();
|
||||
|
||||
for(i = 0; i < length; ++i) {
|
||||
cputcxy(x, (unsigned char)(y + i), (char)0xB3);
|
||||
cputcxy(x, (unsigned char)(y + i), '|');
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
@ -338,25 +338,25 @@ console_readkey(KEY_EVENT_RECORD keyrecord)
|
|||
if(key == 0) {
|
||||
switch(keyrecord.wVirtualKeyCode) {
|
||||
case VK_TAB:
|
||||
if(keyrecord.dwControlKeyState & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)) {
|
||||
key = CTK_CONF_WINDOWSWITCH_KEY;
|
||||
}
|
||||
break;
|
||||
if(keyrecord.dwControlKeyState & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)) {
|
||||
key = CTK_CONF_WINDOWSWITCH_KEY;
|
||||
}
|
||||
break;
|
||||
case VK_LEFT:
|
||||
key = CH_CURS_LEFT;
|
||||
break;
|
||||
key = CH_CURS_LEFT;
|
||||
break;
|
||||
case VK_UP:
|
||||
key = CH_CURS_UP;
|
||||
break;
|
||||
key = CH_CURS_UP;
|
||||
break;
|
||||
case VK_RIGHT:
|
||||
key = CH_CURS_RIGHT;
|
||||
break;
|
||||
key = CH_CURS_RIGHT;
|
||||
break;
|
||||
case VK_DOWN:
|
||||
key = CH_CURS_DOWN;
|
||||
break;
|
||||
key = CH_CURS_DOWN;
|
||||
break;
|
||||
case VK_F10:
|
||||
key = CTK_CONF_MENU_KEY;
|
||||
break;
|
||||
key = CTK_CONF_MENU_KEY;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue