receive f303

Dependencies:   mbed FEP2

Files at this revision

API Documentation at this revision

Comitter:
THtakahiro702286
Date:
Mon Oct 11 07:36:04 2021 +0000
Parent:
0:cbae9e387d69
Commit message:
noise cancel

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r cbae9e387d69 -r 8724fbd520eb main.cpp
--- a/main.cpp	Fri Oct 08 07:25:11 2021 +0000
+++ b/main.cpp	Mon Oct 11 07:36:04 2021 +0000
@@ -16,8 +16,8 @@
         fep.getData(rxdata);
         if(fep.status) {
             led1 = !rxdata[0];
-            EmergencyPower[0] = rxdata[0];
-            EmergencyPower[1] = rxdata[0];
+            EmergencyPower[0] = (rxdata[0] > 1) ? EmergencyPower[0] : rxdata[0];
+            EmergencyPower[1] = (rxdata[0] > 1) ? EmergencyPower[1] : rxdata[0];
         } else {
             led1 = false;
             EmergencyPower[0] = false;