aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorzheng_wenlong <wenlong_zheng@nexty-ele.com>2017-08-25 16:51:16 +0900
committerzheng_wenlong <wenlong_zheng@nexty-ele.com>2017-08-25 16:53:22 +0900
commit4ff6418f145dd4af3a1f5f8b6eba29b958a89521 (patch)
treeb6afcb080f6f92c1639c0ad21231201ad873b950 /src
parent183e61cb341a9bb394b1e933edb66284211ef7e6 (diff)
Fix problem for not copy package folderdab_4.0.3dab/4.0.34.0.3dab
By add package folder but forgot copy it to binary directory. It will cause no config.xml, json in wgt file, and install error. So return to old version but with custom target name package. Change-Id: I156f920b8428357ea2fc8b9aa0725b9dee2a1df5 Signed-off-by: zheng_wenlong <wenlong_zheng@nexty-ele.com>
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt6
-rw-r--r--src/config.xml21
-rw-r--r--src/gear_shift_para.json32
-rw-r--r--src/steering_wheel.json5
-rw-r--r--src/steering_wheel_map.json36
5 files changed, 97 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 71168a3..73377ca 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -79,9 +79,9 @@ set_target_properties(af-steering-wheel-binding PROPERTIES
LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/export.map"
)
-#add_custom_command(TARGET af-steering-wheel-binding POST_BUILD
-# COMMAND cp -f ${CMAKE_CURRENT_SOURCE_DIR}/config.xml ${CMAKE_CURRENT_SOURCE_DIR}/steering_wheel.json ${CMAKE_CURRENT_SOURCE_DIR}/icon.png ${PROJECT_BINARY_DIR}/package/root
-# COMMAND cp -f ${CMAKE_CURRENT_SOURCE_DIR}/steering_wheel_map.json ${CMAKE_CURRENT_SOURCE_DIR}/gear_shift_para.json ${PROJECT_BINARY_DIR}/package/root)
+add_custom_command(TARGET af-steering-wheel-binding POST_BUILD
+ COMMAND cp -f ${CMAKE_CURRENT_SOURCE_DIR}/config.xml ${CMAKE_CURRENT_SOURCE_DIR}/steering_wheel.json ${CMAKE_CURRENT_SOURCE_DIR}/icon.png ${PROJECT_BINARY_DIR}/package/root
+ COMMAND cp -f ${CMAKE_CURRENT_SOURCE_DIR}/steering_wheel_map.json ${CMAKE_CURRENT_SOURCE_DIR}/gear_shift_para.json ${PROJECT_BINARY_DIR}/package/root)
add_custom_target(package DEPENDS ${PROJECT_BINARY_DIR}/package/root
COMMAND wgtpkg-pack -f -o ${PROJECT_BINARY_DIR}/package/${PROJECT_NAME}.wgt ${PROJECT_BINARY_DIR}/package/root)
diff --git a/src/config.xml b/src/config.xml
new file mode 100644
index 0000000..9f3370a
--- /dev/null
+++ b/src/config.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<widget xmlns="http://www.w3.org/ns/widgets" id="agl-service-steering-wheel" version="1.0">
+ <name>steering-wheel-service</name>
+ <icon src="icon.png"/>
+ <content src="config.xml" type="application/vnd.agl.service"/>
+ <description>The name says it all!</description>
+ <author>TOYOTA</author>
+ <license>APL2.0</license>
+ <feature name="urn:AGL:widget:provided-api">
+ <param name="steering-wheel" value="ws" />
+ </feature>
+ <feature name="urn:AGL:widget:required-api">
+ <param name="lib/af-steering-wheel-binding.so" value="local" />
+ </feature>
+ <feature name="urn:AGL:widget:required-permission">
+ <param name="#target" value="main" />
+ <param name="urn:AGL:permission::public:hidden" value="required" />
+ </feature>
+</widget>
+
+
diff --git a/src/gear_shift_para.json b/src/gear_shift_para.json
new file mode 100644
index 0000000..3b58da7
--- /dev/null
+++ b/src/gear_shift_para.json
@@ -0,0 +1,32 @@
+{
+ "GEAR_PARA" : [
+ {
+ "POS" : "First",
+ "VAL" : "4.12",
+ },
+ {
+ "POS" : "Second",
+ "VAL" : "2.84",
+ },
+ {
+ "POS" : "Third",
+ "VAL" : "2.28",
+ },
+ {
+ "POS" : "Fourth",
+ "VAL" : "1.45",
+ },
+ {
+ "POS" : "Fifth",
+ "VAL" : "1.0",
+ },
+ {
+ "POS" : "Sixth",
+ "VAL" : "0.69",
+ },
+ {
+ "POS" : "Reverse",
+ "VAL" : "3.21",
+ },
+ ]
+} \ No newline at end of file
diff --git a/src/steering_wheel.json b/src/steering_wheel.json
new file mode 100644
index 0000000..1a5e889
--- /dev/null
+++ b/src/steering_wheel.json
@@ -0,0 +1,5 @@
+{
+ "dev_name": "/dev/input/js0",
+ "wheel_map": "steering_wheel_map.json",
+ "gear_para": "gear_shift_para.json"
+}
diff --git a/src/steering_wheel_map.json b/src/steering_wheel_map.json
new file mode 100644
index 0000000..9e580d9
--- /dev/null
+++ b/src/steering_wheel_map.json
@@ -0,0 +1,36 @@
+{
+ "PROPERTYS" : [
+ {
+ "PROPERTY" : "VehicleSpeed",
+ "TYPE" : "uint16_t",
+ },
+ {
+ "PROPERTY" : "EngineSpeed",
+ "TYPE" : "uint16_t",
+ },
+ {
+ "PROPERTY" : "AcceleratorPedalPosition",
+ "TYPE" : "uint16_t",
+ },
+ {
+ "PROPERTY" : "TransmissionGearInfo",
+ "TYPE" : "uint16_t",
+ },
+ {
+ "PROPERTY" : "TransmissionMode",
+ "TYPE" : "uint16_t",
+ },
+ {
+ "PROPERTY" : "SteeringWheelAngle",
+ "TYPE" : "uint16_t",
+ },
+ {
+ "PROPERTY" : "TurnSignalStatus",
+ "TYPE" : "uint16_t",
+ },
+ {
+ "PROPERTY" : "LightStatusBrake",
+ "TYPE" : "bool",
+ },
+ ]
+}