HRV -> Mood
Dependencies: MAX30101 Hexi_KW40Z Hexi_OLED_SSD1351
Revision 16:8b4f1abd8acc, committed 2019-03-17
- Comitter:
- jeannie9809
- Date:
- Sun Mar 17 23:03:21 2019 +0000
- Parent:
- 15:5d291cd60879
- Child:
- 17:611a14bc8afd
- Commit message:
- checking
Changed in this revision
| 8cee5929f4d8/main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/8cee5929f4d8/main.cpp Sun Mar 17 07:36:26 2019 +0000
+++ b/8cee5929f4d8/main.cpp Sun Mar 17 23:03:21 2019 +0000
@@ -87,9 +87,14 @@
while (true) {
+
while(ready_to_send == false) {
- Thread::wait(100); // wait until has something to send
+ Thread::wait(1000); // wait until has something to send
+ /*Notify Hexiwear App that it is running Sensor Tag mode*/
+ //kw40z_device.SendSetApplicationMode(GUI_CURRENT_APP_SENSOR_TAG);
}
+
+
UpdateSensorData();
ready_to_send = false;
@@ -130,7 +135,18 @@
void UpdateSensorData(void)
{
// testsignal+=1;
+
battery = valence_arousal;
+
+ /*
+ if(ready_to_send) {
+ battery = valence_arousal;
+ ready_to_send = false;
+ }
+ else
+ battery = 0;
+ */
+
/*battery -= 5;
if(battery < 5) battery = 100;
@@ -461,6 +477,9 @@
else
valence_arousal += 10;
printf("valence_arousal = %d ", valence_arousal);
+ while(ready_to_send) {
+ Thread::wait(1000);
+ }
ready_to_send = true;
}