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.
Diff: System/Process/Process.cpp
- Revision:
- 35:33c6cdba5630
- Parent:
- 34:2fce61e3ebc4
- Child:
- 36:418ee5567687
--- a/System/Process/Process.cpp Tue Oct 29 08:35:05 2019 +0000
+++ b/System/Process/Process.cpp Tue Oct 29 14:54:17 2019 +0000
@@ -1,6 +1,5 @@
#include "mbed.h"
#include "Process.h"
-
#include <stdlib.h>
#include "../../CommonLibraries/PID/PID.h"
#include "../../Communication/RS485/ActuatorHub/ActuatorHub.h"
@@ -67,37 +66,7 @@
else return abs(pwmVal);
}
-int selectnum[16][4]= {
-//1,2,4,8
- {0,0,0,0},
- {1,0,0,0},
- {0,1,0,0},
- {1,1,0,0},
- {0,0,1,0},
- {1,0,1,0},
- {0,1,1,0},
- {1,1,1,0},
- {0,0,0,1},
- {1,0,0,1},
- {0,1,0,1},
- {1,1,0,1},
- {0,0,1,1},
- {1,0,1,1},
- {0,1,1,1},
- {1,1,1,1}
-};
-
-DigitalIn EMC(PC_13);
-
-void LedMode(int num)
-{
- /*
- POTENTIOMETER::dio[0]= selectnum[num][0];;
- POTENTIOMETER::dio[1]= selectnum[num][1];;
- POTENTIOMETER::dio[2]= selectnum[num][2];;
- POTENTIOMETER::dio[3]= selectnum[num][3];;
- */
-}
+DigitalIn EMC(PC_13); //非常停止確認用
bool start_flag = true;
bool UP_flag = false;
@@ -250,14 +219,6 @@
SystemProcessInitialize();
while(1) {
- /*
- if(StertSW){
- LED_DEBUG0=1;
- }
- else{
- LED_DEBUG0=0;
- }
- */
if(EMC==0) {
fast=40;
normal=30;
@@ -294,9 +255,9 @@
if(mode==0) {
if(ZoneSW) {
- LedMode(1);
+ LED::LED::TapeledMode(1);
} else {
- LedMode(2);
+ LED::LED::TapeledMode(2);
}
}
for(int i = 0; i < 8; i++) {
@@ -427,7 +388,7 @@
#if USE_PROCESS_NUM>1
static void Process1()
{
- LedMode(6);
+ LED::LED::TapeledMode(6);
start_flag = true;
mtc=false;
mtc2 = false;
@@ -496,10 +457,10 @@
if(controller->Button.B) {
if(dz4==true) {
if(dz4i==false) {
- solenoid.solenoid4 = SOLENOID_ON;
+ solenoid.solenoid1 = SOLENOID_ON;
dz4i=true;
} else {
- solenoid.solenoid4 = SOLENOID_OFF;
+ solenoid.solenoid1 = SOLENOID_OFF;
dz4i=false;
}
dz4=false;
@@ -515,7 +476,7 @@
{
//Oh So 青ゾーン
countss++;
- LedMode(4);
+ LED::LED::TapeledMode(4);
if(mode==1) {//スタートゾーンから白線検知
fast=40;
normal=30;
@@ -1366,7 +1327,7 @@
static void Process3()
{
//Clearly 赤ゾーン
- LedMode(3);
+ LED::LED::TapeledMode(3);
countss++;
if(mode==1) {//スタートゾーンから白線検知
fast=40;