fixed up bluemonkey configuration
authorKevron Rees <kevron.m.rees@intel.com>
Fri, 12 Sep 2014 21:01:33 +0000 (14:01 -0700)
committerKevron Rees <kevron.m.rees@intel.com>
Fri, 12 Sep 2014 21:01:33 +0000 (14:01 -0700)
examples/CMakeLists.txt
plugins/bluemonkey/config.js

index 866fbb0..4d68156 100644 (file)
@@ -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)
 
index 363f3f8..dd51234 100644 (file)
@@ -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();