diff options
author | Hayato Nakamura <hayato.nakamura@mail.toyota-td.jp> | 2013-11-08 11:01:47 +0900 |
---|---|---|
committer | Hayato Nakamura <hayato.nakamura@mail.toyota-td.jp> | 2013-11-08 11:12:03 +0900 |
commit | 5b06c59adb2ae4047806e07fc6d7892a656ab931 (patch) | |
tree | 887ce638635057d9f87db6829937b324edda18f9 | |
parent | d566a973c3659f100eb55308fc20b73c0b60b681 (diff) | |
download | ico-uxf-device-input-controller-5b06c59adb2ae4047806e07fc6d7892a656ab931.tar.gz ico-uxf-device-input-controller-5b06c59adb2ae4047806e07fc6d7892a656ab931.tar.bz2 ico-uxf-device-input-controller-5b06c59adb2ae4047806e07fc6d7892a656ab931.zip |
Bug fix for : package test script error.submit/tizen_ivi_stable/20131119.040152submit/tizen/20131108.035329accepted/tizen_ivi_stable/20131119.040206accepted/tizen/20131111.231304accepted/tizen/20131108.200358
Change-Id: I60c3ef696f7d5694f03face0cd8cd5b5df6cff83
Signed-off-by: Hayato Nakamura <hayato.nakamura@mail.toyota-td.jp>
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | gtforce/Makefile.am | 1 | ||||
-rw-r--r-- | gtforce/ico_dic-gtforce.c | 8 | ||||
-rw-r--r-- | packaging/ico-uxf-device-input-controller.changes | 5 | ||||
-rw-r--r-- | packaging/ico-uxf-device-input-controller.spec | 16 | ||||
-rw-r--r-- | settings/drivingforcegt.conf | 65 | ||||
-rw-r--r-- | settings/g27racingwheel.conf | 37 | ||||
-rwxr-xr-x | settings/set_navi_busguide.sh | 11 | ||||
-rwxr-xr-x | settings/set_navi_destination.sh | 5 | ||||
-rwxr-xr-x | tests/input-controller-test | 13 | ||||
-rwxr-xr-x | tests/input-controller-test.G25 | 58 | ||||
-rw-r--r-- | tests/test-homescreen.c | 38 | ||||
-rw-r--r-- | tests/testdata/drivingforcegt.conf | 115 | ||||
-rw-r--r-- | tests/testdata/g27racingwheel.conf | 115 | ||||
-rw-r--r-- | tests/testdata/ico-device-input-controller.service | 7 | ||||
-rwxr-xr-x | tests/testdata/set_daynight.sh | 7 |
16 files changed, 400 insertions, 103 deletions
diff --git a/configure.ac b/configure.ac index 8416598..4952171 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ AC_PREREQ([2.68]) AC_INIT([ico-uxf-device-input-controller], - [0.9.01], + [0.9.03], [https://BUG-REPORT-ADDRESS]) AC_CONFIG_HEADERS([config.h]) diff --git a/gtforce/Makefile.am b/gtforce/Makefile.am index d4ab70e..eb093f9 100644 --- a/gtforce/Makefile.am +++ b/gtforce/Makefile.am @@ -19,4 +19,3 @@ ico_dic_gtforce_SOURCES = \ ico_dic-gtforce.c \ ico_dic-wayland.c ico_dic_gtforce_LDADD = $(SIMPLE_CLIENT_LIBS) $(wayland_ivi_client_lib) $(wayland_client_lib) - diff --git a/gtforce/ico_dic-gtforce.c b/gtforce/ico_dic-gtforce.c index b42e464..61939cf 100644 --- a/gtforce/ico_dic-gtforce.c +++ b/gtforce/ico_dic-gtforce.c @@ -660,7 +660,7 @@ ico_dic_js_read(int fd) if (state == WL_KEYBOARD_KEY_STATE_PRESSED) { ICO_DBG("ico_dic_js_read: start script(%s)", iMng->code[icode].appid); if (system(iMng->code[icode].appid) == -1) { - ICO_WRN("ico_dic_js_read: script(%s) Error", + ICO_DBG("ico_dic_js_read: script(%s) ret -1", iMng->code[icode].appid); } } @@ -737,6 +737,10 @@ int main(int argc, char *argv[]) /* debug */ mDebug = 2; } + else if (strcmp( argv[ii], "-Dstdout") == 0) { + /* debug */ + mDebug = 3; + } else if (strcasecmp( argv[ii], "-l") == 0) { /* event input log */ mEventLog = 1; @@ -755,7 +759,7 @@ int main(int argc, char *argv[]) } /* set log name */ - ico_log_open("ico_dic-gtforce"); + ico_log_open(mDebug != 3 ? "ico_dic-gtforce" : NULL); /* read conf file */ confpath = getenv(ICO_DIC_CONF_ENV); diff --git a/packaging/ico-uxf-device-input-controller.changes b/packaging/ico-uxf-device-input-controller.changes index c25e66d..bf1728d 100644 --- a/packaging/ico-uxf-device-input-controller.changes +++ b/packaging/ico-uxf-device-input-controller.changes @@ -1,3 +1,8 @@ +* Fri Nov 08 2013 Shibata Makoto <shibata@mac.tec.toyota.co.jp> accepted/tizen/20131004.165240@340a57b +- 0.9.03 release +-- addition: Home/Back and Menu buttons addition of the steering switch. +-- bug fix: package test script(tests/input-controller-test) error. + * Thu Sep 26 2013 Shibata Makoto <shibata@mac.tec.toyota.co.jp> accepted/tizen/20130919.204300@d52ab79 - 0.9.02 release. -- fix for - When Weston crashed, GtForce device input controller does an loop forever. diff --git a/packaging/ico-uxf-device-input-controller.spec b/packaging/ico-uxf-device-input-controller.spec index 3913148..c0f19d8 100644 --- a/packaging/ico-uxf-device-input-controller.spec +++ b/packaging/ico-uxf-device-input-controller.spec @@ -1,6 +1,6 @@ Name: ico-uxf-device-input-controller Summary: Device Input Controller -Version: 0.9.02 +Version: 0.9.03 Release: 1.1 Group: System/GUI License: Apache License, Version 2.0 @@ -12,11 +12,11 @@ BuildRequires: mesa-devel BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(glesv2) BuildRequires: pkgconfig(glib-2.0) -BuildRequires: ico-uxf-weston-plugin-devel >= 0.9.05 -BuildRequires: ico-uxf-utilities-devel >= 0.2.04 -Requires: weston >= 1.2.1 -Requires: ico-uxf-weston-plugin >= 0.9.05 -Requires: ico-uxf-utilities >= 0.2.04 +BuildRequires: ico-uxf-weston-plugin-devel >= 0.9.07 +BuildRequires: ico-uxf-utilities-devel >= 0.9.01 +Requires: weston >= 1.2.2 +Requires: ico-uxf-weston-plugin >= 0.9.07 +Requires: ico-uxf-utilities >= 0.9.01 %description Device Input Controller for ico-uxf-weston-plugin(Multi Input Manager) @@ -41,8 +41,6 @@ mkdir -p %{buildroot}%{_unitdir_user} install -m 0644 settings/drivingforcegt.conf %{buildroot}%{ictl_conf} install -m 0644 settings/g27racingwheel.conf %{buildroot}%{ictl_conf} install -m 0755 settings/set_daynight.sh %{buildroot}%{ictl_conf} -install -m 0755 settings/set_navi_busguide.sh %{buildroot}%{ictl_conf} -install -m 0755 settings/set_navi_destination.sh %{buildroot}%{ictl_conf} install -m 644 settings/ico-device-input-controller.service %{buildroot}%{_unitdir_user}/ico-device-input-controller.service %files @@ -51,6 +49,4 @@ install -m 644 settings/ico-device-input-controller.service %{buildroot}%{_unitd %{ictl_conf}/drivingforcegt.conf %{ictl_conf}/g27racingwheel.conf %{ictl_conf}/set_daynight.sh -%{ictl_conf}/set_navi_busguide.sh -%{ictl_conf}/set_navi_destination.sh /usr/lib/systemd/user/ico-device-input-controller.service diff --git a/settings/drivingforcegt.conf b/settings/drivingforcegt.conf index c1dfdb5..d395272 100644 --- a/settings/drivingforcegt.conf +++ b/settings/drivingforcegt.conf @@ -21,8 +21,6 @@ ecu=0 0.event=2;4 # event code to Multi Input Manager(Up;Down) 0.code=10:Up;11:Down -# fixed send appid (if fixed switch) ... send key event(Up='U',Down='D') to HapticDaemon -0.fixed=10:appid=ico_uxf_dic-haptic:key=22;11:appid=ico_uxf_dic-haptic:key=32 ## LeftRight key input 1=JS_LR @@ -30,8 +28,6 @@ ecu=0 1.event=2;3 # event code to Multi Input Manager(Left;Right) 1.code=20:Left;21:Right -# fixed send appid (if fixed switch) ... send key event(Left='L',Right='R') to HapticDaemon -1.fixed=20:appid=ico_uxf_dic-haptic:key=38;21:appid=ico_uxf_dic-haptic:key=19 ## CROSS Button input 2=JS_CROSS @@ -39,7 +35,6 @@ ecu=0 2.event=1;0 # event code to Multi Input Manager 2.code=30 -2.fixed=appid=org.tizen.ico.homescreen:key=50 ## SQUARE Button input 3=JS_SQUARE @@ -47,7 +42,6 @@ ecu=0 3.event=1;1 # event code to Multi Input Manager 3.code=40 -3.fixed=shell=/opt/etc/ico/device-input-controller/set_navi_busguide.sh ## CIRCLE Button input 4=JS_CIRCLE @@ -55,7 +49,6 @@ ecu=0 4.event=1;2 # event code to Multi Input Manager 4.code=50 -4.fixed=appid=ico_uxf_dic-haptic:key=24 ## TRIANGLE Button input 5=JS_TRIANGLE @@ -70,35 +63,53 @@ ecu=0 6=JS_PS 6.event=1;20 6.code=101 -6.fixed=shell=/opt/etc/ico/device-input-controller/set_navi_destination.sh -## Home Button -#7=JS_HOME -#7.event=1;19 -#7.code=102 +## Hone Button +7=JS_HONE +7.event=1;19 +7.code=102 +7.fixed=appid=org.tizen.ico.homescreen:key=35 +## L3 Button +8=JS_L3 +8.event=1;11 +8.code=103 +8.fixed=appid=org.tizen.ico.homescreen:key=19 + +## R3 Button +9=JS_R3 +9.event=1;10 +9.code=104 +9.fixed=appid=org.tizen.ico.homescreen:key=38 + +# Start Button +10=JS_START +10.event=1;9 +10.code=105 + +# ## Enter Button -#8=JS_ENTER -#8.event=1;14 -#8.code=103 +#10=JS_ENTER +#10.event=1;14 +#10.code=103 ## Start Button -#9=JS_START -#9.event=1;9 -#9.code=104 +#11=JS_START +#11.event=1;9 +#11.code=104 ## Select Button -#10=JS_SELECT -#10.event=1;8 -#10.code=105 +#12=JS_SELECT +#12.event=1;8 +#12.code=105 ## + Button -#11=JS_PLUS -#11.event=1;15 -#11.code=111 +#13=JS_PLUS +#13.event=1;15 +#13.code=111 ## - Button -#12=JS_MINUS -#12.event=1;18 -#12.code=112 +#14=JS_MINUS +#14.event=1;18 +#14.code=112 diff --git a/settings/g27racingwheel.conf b/settings/g27racingwheel.conf index 906f141..eaecdf6 100644 --- a/settings/g27racingwheel.conf +++ b/settings/g27racingwheel.conf @@ -21,8 +21,6 @@ ecu=0 0.event=2;5 # event code to Multi Input Manager(Up;Down) 0.code=10:Up;11:Down -# fixed send appid (if fixed switch) ... send key event(Up='U',Down='D') to HapticDaemon -0.fixed=10:appid=ico_uxf_dic-haptic:key=22;11:appid=ico_uxf_dic-haptic:key=32 ## LeftRight key input 1=JS_LR @@ -30,8 +28,6 @@ ecu=0 1.event=2;4 # event code to Multi Input Manager(Left;Right) 1.code=20:Left;21:Right -# fixed send appid (if fixed switch) ... send key event(Left='L',Right='R') to HapticDaemon -1.fixed=20:appid=ico_uxf_dic-haptic:key=38;21:appid=ico_uxf_dic-haptic:key=19 ## CROSS Button(Black action button buttom) input 2=JS_CROSS @@ -39,7 +35,6 @@ ecu=0 2.event=1;0 # event code to Multi Input Manager 2.code=30 -2.fixed=appid=org.tizen.ico.homescreen:key=50 ## SQUARE Button(Black action button left) input 3=JS_SQUARE @@ -47,7 +42,6 @@ ecu=0 3.event=1;1 # event code to Multi Input Manager 3.code=40 -3.fixed=shell=/opt/etc/ico/device-input-controller/set_navi_busguide.sh ## CIRCLE Button(Black action button right) input 4=JS_CIRCLE @@ -55,7 +49,6 @@ ecu=0 4.event=1;2 # event code to Multi Input Manager 4.code=50 -4.fixed=appid=ico_uxf_dic-haptic:key=24 ## TRIANGLE Button(Black action button top) input 5=JS_TRIANGLE @@ -70,16 +63,26 @@ ecu=0 6=RED_1 6.event=1;11 6.code=101 -6.fixed=shell=/opt/etc/ico/device-input-controller/set_navi_destination.sh -#7=RED_2 -#7.event=1;8 -#7.code=102 -#8=RED_3 -#8.event=1;9 -#8.code=103 -#9=RED_4 -#9.event=1;10 -#9.code=104 +# +7=RED_2 +7.event=1;8 +7.code=102 +7.fixed=appid=org.tizen.ico.homescreen:key=19 +# +8=RED_3 +8.event=1;9 +8.code=103 +8.fixed=appid=org.tizen.ico.homescreen:key=35 +# +9=RED_4 +9.event=1;10 +9.code=104 +9.fixed=appid=org.tizen.ico.homescreen:key=38 + +## Handle Left Red Buttons(L3) +10=LEFT_LOWER +10.event=1;21 +10.code=73 ## Handle Left Red Buttons #10=LEFT_UPPER diff --git a/settings/set_navi_busguide.sh b/settings/set_navi_busguide.sh deleted file mode 100755 index 66ae829..0000000 --- a/settings/set_navi_busguide.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -# -# sample navi bus guide control - -if [ -e /tmp/busguide_sw.off ] ; then - rm -fr /tmp/busguide_sw.off - /usr/local/bin/set_navi_info genr ON & -else - touch /tmp/busguide_sw.off - /usr/local/bin/set_navi_info genr OFF & -fi diff --git a/settings/set_navi_destination.sh b/settings/set_navi_destination.sh deleted file mode 100755 index 8a1eb9b..0000000 --- a/settings/set_navi_destination.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -# -# set sample navi destination - -/usr/local/bin/set_navi_info dest 35.497467 139.405041 & diff --git a/tests/input-controller-test b/tests/input-controller-test index dcbf026..c9bfeb0 100755 --- a/tests/input-controller-test +++ b/tests/input-controller-test @@ -1,6 +1,6 @@ #!/bin/sh # -# Device Input Controller Test +# Device Input Controller Test for G27 steering switch # # Remark: This examination premises that Weston does not run. @@ -12,18 +12,19 @@ rm -fr ../tests/testlog/* 2> /dev/null export XDG_RUNTIME_DIR=/run/user/5000 # 3 Start Device Input Controllers -export DIC_GTFORCE_CONF="../settings/g27racingwheel.conf" -../gtforce/ico_uxf_dic-gtforce -d -L 2> ../tests/testlog/gtforce.log & +export DIC_GTFORCE_CONF="./testdata/g27racingwheel.conf" +../gtforce/ico_dic-gtforce -Dstdout -L > ../tests/testlog/gtforce.log 2>&1 & sleep 0.5 # 4 Start Weston /usr/bin/weston --idle-time=0 $WESTON_BACKEND --log=../tests/testlog/weston.log & -sleep 600 +sleep 180 # 5 End of Test sleep 1 +/usr/bin/killall ico_dic-gtforce +sleep 0.2 /usr/bin/killall weston -/usr/bin/killall ico_uxf_dic-gtforce sleep 1 # 9 Check Error @@ -44,7 +45,7 @@ fi if [ "$?" != "1" ] ; then FOUND_ERR=1 fi -/bin/grep "Fail" testlog/* +/bin/grep "Fail" testlog/* | /bin/grep -v "error_but_no_problem_for_test" | /bin/grep -v "initialize backlight" if [ "$?" != "1" ] ; then FOUND_ERR=1 fi diff --git a/tests/input-controller-test.G25 b/tests/input-controller-test.G25 new file mode 100755 index 0000000..4bd2ed7 --- /dev/null +++ b/tests/input-controller-test.G25 @@ -0,0 +1,58 @@ +#!/bin/sh +# +# Device Input Controller Test for G25 steering switch +# +# Remark: This examination premises that Weston does not run. + +# 1 Delete log file +mkdir ../tests/testlog 2> /dev/null +rm -fr ../tests/testlog/* 2> /dev/null + +# 2 set weston environment +export XDG_RUNTIME_DIR=/run/user/5000 + +# 3 Start Device Input Controllers +export DIC_GTFORCE_CONF="./testdata/drivingforcegt.conf" +../gtforce/ico_dic-gtforce -Dstdout -L > ../tests/testlog/gtforce.log 2>&1 & +sleep 0.5 + +# 4 Start Weston +/usr/bin/weston --idle-time=0 $WESTON_BACKEND --log=../tests/testlog/weston.log & +sleep 180 + +# 5 End of Test +sleep 1 +/usr/bin/killall ico_dic-gtforce +sleep 0.2 +/usr/bin/killall weston +sleep 1 + +# 9 Check Error +FOUND_ERR=0 +/bin/grep "ERR>" testlog/* +if [ "$?" != "1" ] ; then + FOUND_ERR=1 +fi +/bin/grep "WRN>" testlog/* +if [ "$?" != "1" ] ; then + FOUND_ERR=1 +fi +/bin/grep "Error" testlog/* +if [ "$?" != "1" ] ; then + FOUND_ERR=1 +fi +/bin/grep "error" testlog/* +if [ "$?" != "1" ] ; then + FOUND_ERR=1 +fi +/bin/grep "Fail" testlog/* | /bin/grep -v "error_but_no_problem_for_test" | /bin/grep -v "initialize backlight" +if [ "$?" != "1" ] ; then + FOUND_ERR=1 +fi + +if [ $FOUND_ERR = 0 ] ; then + echo "Device Input Controller Test: OK" +else + echo "Device Input Controller Test: ERROR" +fi + diff --git a/tests/test-homescreen.c b/tests/test-homescreen.c index ae3ad70..68c6d23 100644 --- a/tests/test-homescreen.c +++ b/tests/test-homescreen.c @@ -526,7 +526,8 @@ search_surfaceid(struct display *display, const int surfaceid) static void window_created(void *data, struct ico_window_mgr *ico_window_mgr, - uint32_t surfaceid, const char *winname, int32_t pid, const char *appid) + uint32_t surfaceid, const char *winname, int32_t pid, + const char *appid, int32_t layertype) { struct display *display = data; struct surface_name *p; @@ -541,12 +542,14 @@ window_created(void *data, struct ico_window_mgr *ico_window_mgr, p = p->next; } if (p) { - print_log("HOMESCREEN: Event[window_created] surface=%08x(app=%s,name=%s) exist", - (int)surfaceid, appid, winname); + print_log("HOMESCREEN: Event[window_created] " + "surface=%08x(app=%s,name=%s,type=%x) exist", + (int)surfaceid, appid, winname, layertype); } else { - print_log("HOMESCREEN: Event[window_created] new surface=%08x(app=%s) winname=%s", - (int)surfaceid, appid, winname); + print_log("HOMESCREEN: Event[window_created] " + "new surface=%08x(app=%s) winname=%s layertype=%x", + (int)surfaceid, appid, winname, layertype); p = malloc(sizeof(struct surface_name)); if (! p) { return; @@ -650,15 +653,15 @@ window_visible(void *data, struct ico_window_mgr *ico_window_mgr, static void window_configure(void *data, struct ico_window_mgr *ico_window_mgr, - uint32_t surfaceid, uint32_t node, uint32_t layer, + uint32_t surfaceid, uint32_t node, int32_t layertype, uint32_t layer, int32_t x, int32_t y, int32_t width, int32_t height, int32_t hint) { struct display *display = data; struct surface_name *p; print_log("HOMESCREEN: Event[window_configure] surface=%08x " - "node=%x x/y=%d/%d w/h=%d/%d hint=%d", - (int)surfaceid, node, x, y, width, height, hint); + "node=%x layer=%x.%x x/y=%d/%d w/h=%d/%d hint=%d", + (int)surfaceid, node, layertype, layer, x, y, width, height, hint); p = search_surfaceid(display, (int)surfaceid); if (! p) { @@ -692,9 +695,9 @@ window_active(void *data, struct ico_window_mgr *ico_window_mgr, static void window_surfaces(void *data, struct ico_window_mgr *ico_window_mgr, - const char *appid, struct wl_array *surfaces) + const char *appid, int32_t pid, struct wl_array *surfaces) { - print_log("HOMESCREEN: Event[app_surfaces] app=%s", appid); + print_log("HOMESCREEN: Event[app_surfaces] app=%s pid=%d", appid, pid); } static void @@ -702,9 +705,6 @@ window_map(void *data, struct ico_window_mgr *ico_window_mgr, int32_t event, uint32_t surfaceid, uint32_t type, uint32_t target, int32_t width, int32_t height, int32_t stride, uint32_t format) { -#if 0 - struct display *display = data; -#endif char sevt[16]; switch (event) { @@ -724,14 +724,6 @@ window_map(void *data, struct ico_window_mgr *ico_window_mgr, print_log("HOMESCREEN: Event[map_surface] ev=%s(%d) surf=%08x type=%d target=%x " "w/h/s/f=%d/%d/%d/%x", sevt, event, (int)surfaceid, type, target, width, height, stride, format); -#if 0 - if ((event == ICO_WINDOW_MGR_MAP_SURFACE_EVENT_MAP) || - (event == ICO_WINDOW_MGR_MAP_SURFACE_EVENT_CONTENTS)) { - opengl_thumbnail(display->display, surfaceid, display->surface->dpy, - display->surface->conf, display->surface->egl_surface, - display->surface->ctx, target, width, height, stride, format); - } -#endif } static const struct ico_window_mgr_listener window_mgr_listener = { @@ -789,8 +781,8 @@ cb_input_regions(void *data, struct ico_input_mgr_device *ico_input_mgr_device, if (regions) { wl_array_for_each(region, regions) { n ++; - print_log("HOMESCREEN: Event[input_regions] number of regions=%d", n); } + print_log("HOMESCREEN: Event[input_regions] number of regions=%d", n); n = 0; wl_array_for_each(region, regions) { n ++; @@ -808,7 +800,7 @@ cb_input_regions(void *data, struct ico_input_mgr_device *ico_input_mgr_device, sprintf(schange, "?%d?", region->change); break; } - print_log("HOMESCREEN:%2d. %s %d.%08(%d/%d) &d/%d-%d/%d " + print_log("HOMESCREEN:%2d. %s %d.%08x(%d/%d) %d/%d-%d/%d " "hot=%d/%d cur=%d/%d-%d/%d attr=%x", n, schange, region->node, region->surfaceid, region->surface_x, region->surface_y, region->x, region->y, region->width, diff --git a/tests/testdata/drivingforcegt.conf b/tests/testdata/drivingforcegt.conf new file mode 100644 index 0000000..224c20a --- /dev/null +++ b/tests/testdata/drivingforcegt.conf @@ -0,0 +1,115 @@ +## Multi Input Controller Configurations for GtForce +## /opt/etc/ico/device-input-controller/gtforce_g25.conf +## Sep-08-2013 + +## Device +[device] +# Device Name +name=Driving Force GT +# Device Input Controller +dic=ico_uxf_dic-gtforce +# Device type('8' is input switch) +type=8 +# ECU Id +ecu=0 + +## Input Switch +[input] +## UpDown key input +0=JS_UPDOWN +# input event from device(type;number) +0.event=2;4 +# event code to Multi Input Manager(Up;Down) +0.code=10:Up;11:Down + +## LeftRight key input +1=JS_LR +# input event from device(type;number) +1.event=2;3 +# event code to Multi Input Manager(Left;Right) +1.code=20:Left;21:Right + +## CROSS Button input +2=JS_CROSS +# input event from device(type;number) +2.event=1;0 +# event code to Multi Input Manager +2.code=30 + +## SQUARE Button input +3=JS_SQUARE +# input event from device(type;number) +3.event=1;1 +# event code to Multi Input Manager +3.code=40 + +## CIRCLE Button input +4=JS_CIRCLE +# input event from device(type;number) +4.event=1;2 +# event code to Multi Input Manager +4.code=50 + +## TRIANGLE Button input +5=JS_TRIANGLE +# input event from device(type;number) +5.event=1;3 +# event code to Multi Input Manager +5.code=60 +# fixed start shell script +5.fixed=shell=./testdata/set_daynight.sh + +## PS Button +6=JS_PS +6.event=1;20 +6.code=101 + +## Hone Button +7=JS_HONE +7.event=1;19 +7.code=102 +7.fixed=appid=org.tizen.ico.homescreen:key=35 + +## L3 Button +8=JS_L3 +8.event=1;11 +8.code=103 +8.fixed=appid=org.tizen.ico.homescreen:key=19 + +## R3 Button +9=JS_R3 +9.event=1;10 +9.code=104 +9.fixed=appid=org.tizen.ico.homescreen:key=38 + +# Start Button +10=JS_START +10.event=1;9 +10.code=105 + +# +## Enter Button +#10=JS_ENTER +#10.event=1;14 +#10.code=103 + +## Start Button +#11=JS_START +#11.event=1;9 +#11.code=104 + +## Select Button +#12=JS_SELECT +#12.event=1;8 +#12.code=105 + +## + Button +#13=JS_PLUS +#13.event=1;15 +#13.code=111 + +## - Button +#14=JS_MINUS +#14.event=1;18 +#14.code=112 + diff --git a/tests/testdata/g27racingwheel.conf b/tests/testdata/g27racingwheel.conf new file mode 100644 index 0000000..9ac32fa --- /dev/null +++ b/tests/testdata/g27racingwheel.conf @@ -0,0 +1,115 @@ +## Multi Input Controller Configurations for GtForce +## /opt/etc/ico/device-input-controller/gtforce_g27.conf +## Sep-08-2013 + +## Device +[device] +# Device Name +name=G27 Racing Wheel +# Device Input Controller +dic=ico_uxf_dic-gtforce +# Device type('8' is input switch) +type=8 +# ECU Id +ecu=0 + +## Input Switch +[input] +## UpDown key input +0=JS_UPDOWN +# input event from device(type;number) +0.event=2;5 +# event code to Multi Input Manager(Up;Down) +0.code=10:Up;11:Down + +## LeftRight key input +1=JS_LR +# input event from device(type;number) +1.event=2;4 +# event code to Multi Input Manager(Left;Right) +1.code=20:Left;21:Right + +## CROSS Button(Black action button buttom) input +2=JS_CROSS +# input event from device(type;number) +2.event=1;0 +# event code to Multi Input Manager +2.code=30 + +## SQUARE Button(Black action button left) input +3=JS_SQUARE +# input event from device(type;number) +3.event=1;1 +# event code to Multi Input Manager +3.code=40 + +## CIRCLE Button(Black action button right) input +4=JS_CIRCLE +# input event from device(type;number) +4.event=1;2 +# event code to Multi Input Manager +4.code=50 + +## TRIANGLE Button(Black action button top) input +5=JS_TRIANGLE +# input event from device(type;number) +5.event=1;3 +# event code to Multi Input Manager +5.code=60 +# fixed start shell script +5.fixed=shell=./testdata/set_daynight.sh + +## Shift Red Button +6=RED_1 +6.event=1;11 +6.code=101 +# +7=RED_2 +7.event=1;8 +7.code=102 +7.fixed=appid=org.tizen.ico.homescreen:key=19 +# +8=RED_3 +8.event=1;9 +8.code=103 +8.fixed=appid=org.tizen.ico.homescreen:key=35 +# +9=RED_4 +9.event=1;10 +9.code=104 +9.fixed=appid=org.tizen.ico.homescreen:key=38 + +## Handle Left Red Buttons(L3) +10=LEFT_LOWER +10.event=1;21 +10.code=73 + +## Handle Left Red Buttons +#10=LEFT_UPPER +#10.event=1;7 +#10.code=71 +#11=LEFT_MIDDLE +#11.event=1;20 +#11.code=72 +#12=LEFT_LOWER +#12.event=1;21 +#12.code=73 + +## Handle Right Red Button +#13=RIGHT_UPPER +#13.event=1;6 +#13.code=81 +#14=RIGHT_MIDDLE +#14.event=1;18 +#14.code=82 +#15=RIGHT_LOWER +#15.event=1;19 +#15.code=83 + +## Handle Under Switch +#16=HANDLE_LEFT +#16.event=1;5 +#16.code=91 +#17=HANDLE_RIGHT +#17.event=1;4 +#17.code=92 diff --git a/tests/testdata/ico-device-input-controller.service b/tests/testdata/ico-device-input-controller.service new file mode 100644 index 0000000..1d58280 --- /dev/null +++ b/tests/testdata/ico-device-input-controller.service @@ -0,0 +1,7 @@ +[Unit] +Description=ico device input controller +Requires=weston.service +After=weston.service + +[Service] +ExecStart=/usr/bin/ico_dic-gtforce -d diff --git a/tests/testdata/set_daynight.sh b/tests/testdata/set_daynight.sh new file mode 100755 index 0000000..53c3b7d --- /dev/null +++ b/tests/testdata/set_daynight.sh @@ -0,0 +1,7 @@ +#!/bin/sh +# +# set day/night mode + +echo "set_daynight.sh: called set_daynight.sh" + +exit 0 |