From 5b4767dd409c5855687476d9636de96411b57496 Mon Sep 17 00:00:00 2001 From: CSylvain Date: Fri, 23 Feb 2018 16:55:06 -0500 Subject: [PATCH 1/3] Particle InternetButton has burst read and temp sensor InternetButton uses ADXL362 - chip library includes burst XYZT read and temp sensor read. update adds methods for these chip functions. --- src/InternetButton.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/InternetButton.h b/src/InternetButton.h index 199143e..90a3020 100644 --- a/src/InternetButton.h +++ b/src/InternetButton.h @@ -16,6 +16,8 @@ Modified for Spark Core/Button October 2014 Updated for Particle Photon July 2015 by jenesaisdiq + Updated for Particle InternetButton February 2018 + by csylvain */ @@ -57,9 +59,13 @@ class InternetButton { readX(void), readY(void), readZ(void), + readT(void), + readXYZT(void), readX16(void), readY16(void), readZ16(void), + readT16(void), + readXYZT16(void), getBPM(void); uint32_t wheel(uint8_t WheelPos); From f0d558b0d897559557ce54628889fa1ac25f9306 Mon Sep 17 00:00:00 2001 From: CSylvain Date: Fri, 23 Feb 2018 17:25:51 -0500 Subject: [PATCH 2/3] needed to rethink the burst read methods reworked readXYZT() and readXYZT16() to use call by reference with no function return value --- src/InternetButton.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/InternetButton.h b/src/InternetButton.h index 90a3020..101c075 100644 --- a/src/InternetButton.h +++ b/src/InternetButton.h @@ -60,13 +60,14 @@ class InternetButton { readY(void), readZ(void), readT(void), - readXYZT(void), readX16(void), readY16(void), readZ16(void), readT16(void), - readXYZT16(void), getBPM(void); + void + readXYZT(int &XData, int &YData, int &ZData, int &TempData), + readXYZT16(int &XData, int &YData, int &ZData, int &TempData); uint32_t wheel(uint8_t WheelPos); From 873dce93d0cf610310161a8e62469d9c2f0401fe Mon Sep 17 00:00:00 2001 From: CSylvain Date: Fri, 23 Feb 2018 17:49:59 -0500 Subject: [PATCH 3/3] update parameter names change parameter names to conform to existing method name convention --- src/InternetButton.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/InternetButton.h b/src/InternetButton.h index 101c075..0042308 100644 --- a/src/InternetButton.h +++ b/src/InternetButton.h @@ -66,8 +66,8 @@ class InternetButton { readT16(void), getBPM(void); void - readXYZT(int &XData, int &YData, int &ZData, int &TempData), - readXYZT16(int &XData, int &YData, int &ZData, int &TempData); + readXYZT(int &XData, int &YData, int &ZData, int &TData), + readXYZT16(int &XData, int &YData, int &ZData, int &TData); uint32_t wheel(uint8_t WheelPos);