summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevron Rees <kevron.m.rees@intel.com>2014-09-12 14:01:33 -0700
committerKevron Rees <kevron.m.rees@intel.com>2014-09-12 14:01:33 -0700
commita77fb420eec91790c5d3c6d30ab9a049a3db8613 (patch)
treead7929304801a95acba15caa38817b77c01dacd3
parente62d8834dae9bf2954e8ae052ee774a463d4e59b (diff)
downloadautomotive-message-broker-a77fb420eec91790c5d3c6d30ab9a049a3db8613.tar.gz
fixed up bluemonkey configuration
-rw-r--r--examples/CMakeLists.txt3
-rw-r--r--plugins/bluemonkey/config.js18
2 files changed, 18 insertions, 3 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 866fbb02..4d68156a 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,6 +1,6 @@
set(amb_examples configwheel databaseconfig databasesource dbusconfig exampleconfig
gpsnmea obdsourceconfig opencvluxconfig opencvdbusconfig qtmainloopconfig websocketsink2 websocketsource2
- testsourceconfig)
+ testsourceconfig bluemonkey/bluemonkeyconfig)
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/configwheel.in ${CMAKE_CURRENT_SOURCE_DIR}/configwheel @ONLY)
@@ -16,6 +16,7 @@ configure_file (${CMAKE_CURRENT_SOURCE_DIR}/qtmainloopconfig.in ${CMAKE_CURRENT_
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/websocketsink2.in ${CMAKE_CURRENT_SOURCE_DIR}/websocketsink2 @ONLY)
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/websocketsource2.in ${CMAKE_CURRENT_SOURCE_DIR}/websocketsource2 @ONLY)
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/testsourceconfig.in ${CMAKE_CURRENT_SOURCE_DIR}/testsourceconfig @ONLY)
+configure_file (${CMAKE_CURRENT_SOURCE_DIR}/bluemonkey/bluemonkeyconfig.in ${CMAKE_CURRENT_SOURCE_DIR}/bluemonkey/bluemonkeyconfig @ONLY)
install (FILES ${amb_examples} DESTINATION /etc/ambd/examples)
diff --git a/plugins/bluemonkey/config.js b/plugins/bluemonkey/config.js
index 363f3f85..dd51234e 100644
--- a/plugins/bluemonkey/config.js
+++ b/plugins/bluemonkey/config.js
@@ -1,5 +1,19 @@
var speedProperty = bluemonkey.subscribeTo("VehicleSpeed");
-bluemonkey.loadConfig("customPrograms.js");
+bluemonkey.log("Javascript engine works!!!!");
-
+bluemonkey.createCustomProperty("BluemonkeyTest", false);
+
+var bluemonkeyTest = bluemonkey.subscribeTo("BluemonkeyTest");
+
+bluemonkeyTest.value = true;
+
+var timer = bluemonkey.createTimer();
+
+timer.interval = 1000;
+timer.singleShot = false;
+timer.timeout.connect(function() {
+ bluemonkeyTest.value = !bluemonkeyTest.value;
+});
+
+timer.start();