Javascript wrappers for LSM303AGR Sensor library
Dependencies: LSM303AGR
Revision 4:ae1fba759405, committed 2018-01-17
- Comitter:
- akhtar.syedzeeshan@gmail.com
- Date:
- Wed Jan 17 10:56:45 2018 +0100
- Parent:
- 3:d076984ee23b
- Commit message:
- Code fixes
Changed in this revision
--- a/LSM303AGR_JS-js.cpp Tue Oct 31 16:23:10 2017 +0100 +++ b/LSM303AGR_JS-js.cpp Wed Jan 17 10:56:45 2018 +0100 @@ -9,7 +9,7 @@ ****************************************************************************** * @attention * - * <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2> + * <h2><center>© 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: @@ -91,7 +91,6 @@ CHECK_ARGUMENT_TYPE_ON_CONDITION(LSM303AGR_JS, init_acc_spi, 2, number, args_count == 4); CHECK_ARGUMENT_TYPE_ON_CONDITION(LSM303AGR_JS, init_acc_spi, 3, number, args_count == 4); - printf("init_acc_spi!\n"); // Unwrap native LSM303AGR_JS object void *void_ptr; const jerry_object_native_info_t *type_ptr; @@ -149,7 +148,6 @@ CHECK_ARGUMENT_TYPE_ON_CONDITION(LSM303AGR_JS, init_acc_i2c, 2, number, args_count == 3); CHECK_ARGUMENT_TYPE_ON_CONDITION(LSM303AGR_JS, init_acc_i2c, 3, number, args_count == 4); - printf("init_acc_i2c!\n"); // Unwrap native LSM303AGR_JS object void *void_ptr; const jerry_object_native_info_t *type_ptr; @@ -212,7 +210,6 @@ CHECK_ARGUMENT_TYPE_ALWAYS(LSM303AGR_JS, init_mag_spi, 1, number); CHECK_ARGUMENT_TYPE_ON_CONDITION(LSM303AGR_JS, init_mag_spi, 2, number, args_count == 3); - printf("init_mag_spi!\n"); // Unwrap native LSM303AGR_JS object void *void_ptr; const jerry_object_native_info_t *type_ptr; @@ -269,7 +266,6 @@ CHECK_ARGUMENT_TYPE_ON_CONDITION(LSM303AGR_JS, init_mag_i2c, 1, number, args_count == 2); CHECK_ARGUMENT_TYPE_ON_CONDITION(LSM303AGR_JS, init_mag_i2c, 2, number, args_count == 3); - printf("init_mag_i2c!\n"); // Unwrap native LSM303AGR_JS object void *void_ptr; const jerry_object_native_info_t *type_ptr; @@ -342,7 +338,7 @@ // Cast it back to JavaScript jerry_value_t out = jerry_create_string((unsigned char *)result); - printf("acc: %s\n", result); + //printf("acc: %s\n", result); // Recycle the result from function delete result; @@ -379,7 +375,7 @@ // Cast it back to JavaScript jerry_value_t out = jerry_create_string((unsigned char *)result); - printf("mag: %s\n", result); + //printf("mag: %s\n", result); // Recycle the result from function delete result;
--- a/LSM303AGR_JS-js.h Tue Oct 31 16:23:10 2017 +0100 +++ b/LSM303AGR_JS-js.h Wed Jan 17 10:56:45 2018 +0100 @@ -9,7 +9,7 @@ ****************************************************************************** * @attention * - * <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2> + * <h2><center>© 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:
--- a/LSM303AGR_JS.cpp Tue Oct 31 16:23:10 2017 +0100 +++ b/LSM303AGR_JS.cpp Wed Jan 17 10:56:45 2018 +0100 @@ -9,7 +9,7 @@ ****************************************************************************** * @attention * - * <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2> + * <h2><center>© 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:
--- a/LSM303AGR_JS.h Tue Oct 31 16:23:10 2017 +0100 +++ b/LSM303AGR_JS.h Wed Jan 17 10:56:45 2018 +0100 @@ -9,7 +9,7 @@ ****************************************************************************** * @attention * - * <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2> + * <h2><center>© 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: @@ -62,7 +62,7 @@ public: /* Constructors */ - LSM303AGR_JS(){ printf("calling empty constructor"); } + LSM303AGR_JS(){} //LSM303AGRAccSensor(SPI *spi, PinName cs_pin, PinName int1_pin=NC, PinName int2_pin=NC); // SPI3W ONLY void init_acc(SPI &spi, PinName cs_pin);