Pilot 1 working code (excluding new patient after calculation). %d changed in %f sensordata serial log.

Dependencies:   ADS1015 MPU6050 PixelArray mbed

Fork of Momo_New by Momo Medical

Revision:
24:782c4dc4a3ff
Parent:
23:4a09554bdc1a
Child:
25:96c34634abda
--- a/Sensorplate/main.cpp	Mon Oct 02 16:10:14 2017 +0000
+++ b/Sensorplate/main.cpp	Mon Oct 02 16:25:29 2017 +0000
@@ -417,10 +417,9 @@
         speaker2 = 0;
     }
 
-    if ((alarm == 1 && mute_state == 0 && (speaker_timer.read_ms() < speaker_active_ms)) || ((batteryvoltage_current < alarm_voltage) && (speaker_timer.read_ms() < speaker_active_ms))) { // Set speaker on for 750 ms.
+    if ((alarm == 1 && mute_state == 0 && (speaker_timer.read_ms() < speaker_active_ms)) || ((batteryvoltage_current < alarm_voltage) && (speaker_timer.read_ms() < speaker_active_ms) && power_plug_state == 0)) { // Set speaker on for 750 ms.
         speaker1 = 1;                                                       // Set speaker.
         speaker2 = 1;
-        speaker_timer.reset();
         speaker_timer.start();                                              // Set timer for speaker to iterate on and off.
     }