Skip to content

Commit 260e2d0

Browse files
committedJul 4, 2012
Add wireless (wireless over OpenWrt router) configure code
1 parent 6f21cf4 commit 260e2d0

File tree

5 files changed

+650
-2
lines changed

5 files changed

+650
-2
lines changed
 

‎src/Makefile

+3-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ LDFLAGS = -mbarrel-shift-enabled -mmultiply-enabled -mdivide-enabled \
4242
-msign-extend-enabled -B$(RTEMS_MAKEFILE_PATH)/lib \
4343
-specs bsp_specs -qrtems
4444
LIBS = -lnfs -lftpd -ltelnetd -lyaffs2 -lmtk -llop -lfpvm -lpng -ljpeg \
45-
-lcurl -lexpat -lz -lm
45+
-lcurl -lexpat -ljansson -lz -lm
4646
OBJDIR = obj
4747
BINDIR = bin
4848

@@ -53,7 +53,8 @@ OBJS += $(addprefix pixbuf/,dither.o loaderjpeg.o loaderpng.o manager.o)
5353
OBJS += $(addprefix gui/,messagebox.o filedialog.o resmgr.o guirender.o \
5454
performance.o cp.o keyboard.o ir.o audio.o midi.o oscsettings.o \
5555
dmxspy.o dmxdesk.o dmx.o videoin.o rsswall.o patcheditor.o monitor.o \
56-
firstpatch.o filemanager.o sysettings.o about.o flash.o shutdown.o)
56+
firstpatch.o filemanager.o sysettings.o about.o flash.o shutdown.o \
57+
wireless.o )
5758
ifeq ($(WITH_PDF),1)
5859
OBJS += $(addprefix gui/,pdfreader.o)
5960
CFLAGS += -DWITH_PDF

‎src/gui/sysettings.c

+9
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "../sysconfig.h"
2525
#include "filedialog.h"
2626
#include "sysettings.h"
27+
#include "wireless.h"
2728

2829
static int appid;
2930
static struct filedialog *browse_wallpaper_dlg;
@@ -68,6 +69,11 @@ static void dhcp_callback(mtk_event *e, void *arg)
6869
update_network();
6970
}
7071

72+
static void wireless_callback(mtk_event *e, void *arg)
73+
{
74+
open_wireless_window();
75+
}
76+
7177
static int current_asmode;
7278

7379
static void asmode_callback(mtk_event *e, void *arg)
@@ -206,8 +212,10 @@ void init_sysettings(void)
206212
"g_network1 = new Grid()",
207213
"l_dhcp = new Label(-text \"DHCP client:\")",
208214
"b_dhcp = new Button(-text \"Enable\")",
215+
"b_wireless = new Button(-text \"Wireless over Ethernet\")",
209216
"g_network1.place(l_dhcp, -column 1 -row 1)",
210217
"g_network1.place(b_dhcp, -column 2 -row 1)",
218+
"g_network1.place(b_wireless, -column 3 -row 1)",
211219
"g_network2 = new Grid()",
212220
"l_ip = new Label(-text \"IP address:\")",
213221
"e_ip = new Entry()",
@@ -314,6 +322,7 @@ void init_sysettings(void)
314322
mtk_bind(appid, "b_kbd_german", "press", layout_callback, (void *)SC_KEYBOARD_LAYOUT_GERMAN);
315323

316324
mtk_bind(appid, "b_dhcp", "press", dhcp_callback, NULL);
325+
mtk_bind(appid, "b_wireless", "press", wireless_callback, NULL);
317326

318327
mtk_bind(appid, "b_asmode_none", "press", asmode_callback, (void *)SC_AUTOSTART_NONE);
319328
mtk_bind(appid, "b_asmode_simple", "press", asmode_callback, (void *)SC_AUTOSTART_SIMPLE);

0 commit comments

Comments
 (0)