Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BLE_API mbed nRF51822
Revision 1:88e3620627f9, committed 2016-02-26
- Comitter:
- sk84life85
- Date:
- Fri Feb 26 23:27:37 2016 +0000
- Parent:
- 0:a394a04bd0b7
- Commit message:
- test
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Feb 26 22:53:44 2016 +0000
+++ b/main.cpp Fri Feb 26 23:27:37 2016 +0000
@@ -123,6 +123,13 @@
double CIEx[60];
double CIEy[60];
+double xPPU9_5 = 0.05660;
+double yPPU9_5 = 0.06549;
+
+
+double xPPU9_4 = 0.05072;
+double yPPU9_4 = 0.04818;
+
double xPPU2_14 = 0.03221;
double yPPU2_14 = 0.02597;
@@ -751,6 +758,14 @@
len = snprintf((char*) buf, MAX_REPLY_LEN, "%s", "4-8");
m_ble.updateCharacteristicValue(m_uart_service_ptr->getRXCharacteristicHandle(), buf, len);
}
+ else if( (xPPU9_4-xThresh<chromaX) && (chromaX<xPPU9_4+xThresh) && (yPPU9_4-yThresh<chromaY) && (chromaY<yPPU9_4+yThresh) ){
+ len = snprintf((char*) buf, MAX_REPLY_LEN, "%s", "9-4");
+ m_ble.updateCharacteristicValue(m_uart_service_ptr->getRXCharacteristicHandle(), buf, len);
+ }
+ else if( (xPPU9_5-xThresh<chromaX) && (chromaX<xPPU9_5+xThresh) && (yPPU9_5-yThresh<chromaY) && (chromaY<yPPU9_5+yThresh) ){
+ len = snprintf((char*) buf, MAX_REPLY_LEN, "%s", "9-5");
+ m_ble.updateCharacteristicValue(m_uart_service_ptr->getRXCharacteristicHandle(), buf, len);
+ }
else{
len = snprintf((char*) buf, MAX_REPLY_LEN, "%s", "Unregistered");
m_ble.updateCharacteristicValue(m_uart_service_ptr->getRXCharacteristicHandle(), buf, len);