aa

Dependencies:   mbed

Revision:
30:8f092276b2ba
Parent:
29:44d5454ce8fa
Child:
32:985ec7913f2a
--- a/System/Process/Process.cpp	Fri Oct 18 22:33:25 2019 +0000
+++ b/System/Process/Process.cpp	Tue Oct 22 02:03:26 2019 +0000
@@ -1,12 +1,12 @@
 #include "mbed.h"
 #include "Process.h"
-#include "Pulse.h"
+
 #include <stdlib.h>
 #include "../../CommonLibraries/PID/PID.h"
 #include "../../Communication/RS485/ActuatorHub/ActuatorHub.h"
 #include "../../Communication/RS485/LineHub/LineHub.h"
 #include "../../Communication/Controller/Controller.h"
-#include "../../Input/Switch/Switch.h"
+#include "../../Switch/Switch.h"
 
 #include "../../LED/LED.h"
 #include "../../Safty/Safty.h"
@@ -37,23 +37,7 @@
 /*Replace here with the definition code of your variables.*/
 
 
-Serial pc(USBTX, USBRX);
-
-//**************Buzzer****************
-//DigitalOut buzzer(BUZZER_PIN);
-void BuzzerTimer_func();
-Ticker BuzzerTimer;
-bool EMGflag = false;
-PwmOut buzzer(BUZZER_PIN);
-//**************Buzzer****************
-
-//************TapeLed*****************
-void TapeLedEms_func();
-TapeLedData tapeLED;
-TapeLedData sendLedData;
-TapeLED_Mode ledMode = Normal;
-Ticker tapeLedTimer;
-//************TapaLed*****************
+//Serial pc(USBTX, USBRX);
 
 const int omni[15][15] = {
     {    0,     5,    21,     47,     83,    130,    187,    255,    255,    255,    255,    255,    255,    255,    255 },
@@ -190,52 +174,35 @@
 
 }
 
-
 void SystemProcess()
 {
     SystemProcessInitialize();
+    
     while(1) {
-        
-        buzzer.period(1.0/800);
 
-#ifdef USE_MU
+		#ifdef USE_MU
         controller = CONTROLLER::Controller::GetData();
-#endif
+		#endif
 
-#ifdef USE_ERRORCHECK
+		#ifdef USE_ERRORCHECK
         if(SAFTY::ErrorCheck::Check() & SAFTY::Error::ControllerLost) {
             CONTROLLER::Controller::DataReset();
             AllActuatorReset();
             lock = true;
         } else
-#endif
+		#endif
         {
 
-#ifdef USE_SUBPROCESS
+			#ifdef USE_SUBPROCESS
             if(!lock) {
                 Process[current]();
             } else
-#endif
+			#endif
             {
                 //ロック時の処理
             }
         }
-
-
-        //Emergency!
-        /*
-        if(!EMG_0 && !EMG_1 && !EMGflag){
-        	buzzer = 0;
-        	BuzzerTimer.attach(BuzzerTimer_func, 1);
-        	EMGflag = true;
-        	LED_DEBUG0 = 1;
-        }
-        if(EMG_0 && EMG_1 && EMGflag){
-        	buzzer = 1;
-        	BuzzerTimer.detach();
-        	EMGflag = false;
-        }
-        */
+        
         SystemProcessUpdate();
     }
 }
@@ -331,17 +298,6 @@
 	#endif
 }
 
-void BuzzerTimer_func()
-{
-    buzzer = !buzzer;
-    //LED_DEBUG0 = !LED_DEBUG0;
-}
-
-void TapeLedEms_func()
-{
-    sendLedData.code = sendLedData.code == (uint32_t)Red ? (uint32_t)Black : (uint32_t)Red;
-}
-
 #pragma region USER-DEFINED-FUNCTIONS
 
 uint8_t SetStatus(int pwmVal)