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])
ico_dic-gtforce.c \
ico_dic-wayland.c
ico_dic_gtforce_LDADD = $(SIMPLE_CLIENT_LIBS) $(wayland_ivi_client_lib) $(wayland_client_lib)
-
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);
}
}
/* 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;
}
/* 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);
+* 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.
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
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)
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
%{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
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
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
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
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
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
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
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
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
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
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
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
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
+++ /dev/null
-#!/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
+++ /dev/null
-#!/bin/sh
-#
-# set sample navi destination
-
-/usr/local/bin/set_navi_info dest 35.497467 139.405041 &
#!/bin/sh
#
-# Device Input Controller Test
+# Device Input Controller Test for G27 steering switch
#
# Remark: This examination premises that Weston does not run.
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
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
--- /dev/null
+#!/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
+
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;
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;
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) {
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
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) {
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 = {
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 ++;
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,
--- /dev/null
+## 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
+
--- /dev/null
+## 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
--- /dev/null
+[Unit]
+Description=ico device input controller
+Requires=weston.service
+After=weston.service
+
+[Service]
+ExecStart=/usr/bin/ico_dic-gtforce -d
--- /dev/null
+#!/bin/sh
+#
+# set day/night mode
+
+echo "set_daynight.sh: called set_daynight.sh"
+
+exit 0