Javascript wrappers for LPS22HB Sensor library

Dependencies:   LPS22HB

Dependents:   ST_SENSOR_JS

Files at this revision

API Documentation at this revision

Comitter:
akhtar.syedzeeshan@gmail.com
Date:
Wed Jan 17 10:55:45 2018 +0100
Parent:
5:e92dbbec30d7
Commit message:
Code fixes

Changed in this revision

LPS22HB_JS-js.cpp Show annotated file Show diff for this revision Revisions of this file
LPS22HB_JS-js.h Show annotated file Show diff for this revision Revisions of this file
LPS22HB_JS.cpp Show annotated file Show diff for this revision Revisions of this file
LPS22HB_JS.h Show annotated file Show diff for this revision Revisions of this file
diff -r e92dbbec30d7 -r a480866ede7e LPS22HB_JS-js.cpp
--- a/LPS22HB_JS-js.cpp	Tue Oct 31 16:20:09 2017 +0100
+++ b/LPS22HB_JS-js.cpp	Wed Jan 17 10:55:45 2018 +0100
@@ -9,7 +9,7 @@
  ******************************************************************************
  * @attention
  *
- * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
+ * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
  *
  * Redistribution and use in source and binary forms, with or without modification,
  * are permitted provided that the following conditions are met:
@@ -219,7 +219,7 @@
     // Cast it back to JavaScript
     jerry_value_t out = jerry_create_string((unsigned char *)result);
     
-    printf("temp: %s\n", result);
+    //printf("temp: %s\n", result);
    
     // Recycle the result from function
     delete result;
@@ -259,7 +259,7 @@
     // Cast it back to JavaScript
     jerry_value_t out = jerry_create_string((unsigned char *)result);
     
-    printf("temp: %s\n", result);
+    //printf("temp: %s\n", result);
    
     // Recycle the result from function
     delete result;
@@ -291,7 +291,7 @@
     // Get the result from the C++ API
     float result = native_ptr->get_pressure();
     
-    printf("pressure: %f\n", result);
+    //printf("pressure: %f\n", result);
    
     // Cast it back to JavaScript and return
     return jerry_create_number(result);
@@ -325,7 +325,7 @@
     // Cast it back to JavaScript
     jerry_value_t out = jerry_create_string((unsigned char *)result);
     
-    printf("pressure: %s\n", result);
+    //printf("pressure: %s\n", result);
    
     // Recycle the result from function
     delete result;
diff -r e92dbbec30d7 -r a480866ede7e LPS22HB_JS-js.h
--- a/LPS22HB_JS-js.h	Tue Oct 31 16:20:09 2017 +0100
+++ b/LPS22HB_JS-js.h	Wed Jan 17 10:55:45 2018 +0100
@@ -9,7 +9,7 @@
  ******************************************************************************
  * @attention
  *
- * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
+ * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
  *
  * Redistribution and use in source and binary forms, with or without modification,
  * are permitted provided that the following conditions are met:
diff -r e92dbbec30d7 -r a480866ede7e LPS22HB_JS.cpp
--- a/LPS22HB_JS.cpp	Tue Oct 31 16:20:09 2017 +0100
+++ b/LPS22HB_JS.cpp	Wed Jan 17 10:55:45 2018 +0100
@@ -9,7 +9,7 @@
  ******************************************************************************
  * @attention
  *
- * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
+ * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
  *
  * Redistribution and use in source and binary forms, with or without modification,
  * are permitted provided that the following conditions are met:
diff -r e92dbbec30d7 -r a480866ede7e LPS22HB_JS.h
--- a/LPS22HB_JS.h	Tue Oct 31 16:20:09 2017 +0100
+++ b/LPS22HB_JS.h	Wed Jan 17 10:55:45 2018 +0100
@@ -9,7 +9,7 @@
  ******************************************************************************
  * @attention
  *
- * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
+ * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
  *
  * Redistribution and use in source and binary forms, with or without modification,
  * are permitted provided that the following conditions are met:
@@ -60,7 +60,7 @@
 
 public:
     /* Constructors */
-    LPS22HB_JS(){ printf("calling empty constructor"); }
+    LPS22HB_JS(){}
     
     LPS22HB_JS(DevI2C &devI2c);
     void init(DevI2C &devI2c);