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.
Revision 40:461a08f581b6, committed 2019-11-05
- Comitter:
- yabahiro
- Date:
- Tue Nov 05 20:42:28 2019 +0000
- Parent:
- 39:784552c26163
- Commit message:
- aa; ;
Changed in this revision
System/Process/Process.cpp | Show annotated file Show diff for this revision Revisions of this file |
System/Process/Process.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/System/Process/Process.cpp Tue Nov 05 08:38:32 2019 +0000 +++ b/System/Process/Process.cpp Tue Nov 05 20:42:28 2019 +0000 @@ -279,7 +279,7 @@ if(ZoneSW) { countss=0; mode=1; - current = 4;//10GATU30変更した + current = 3;//10GATU30変更した } else { countss = 0; @@ -1915,6 +1915,35 @@ //Clearly 赤ゾーン LED::LED::TapeledMode(3); countss++; + if(mode==1) { + motor[TIRE_FR].pwm = fast; + motor[TIRE_FR].dir = BACK; + motor[TIRE_FL].pwm = fast; + motor[TIRE_FL].dir = FOR; + motor[TIRE_BR].pwm = fast; + motor[TIRE_BR].dir = BACK; + motor[TIRE_BL].pwm = fast; + motor[TIRE_BL].dir = FOR; + if(LIDAR) { + mode=2; + } + } + if(mode==2) { + motor[TIRE_FR].pwm = slow; + motor[TIRE_FR].dir = BACK; + motor[TIRE_FL].pwm = slow; + motor[TIRE_FL].dir = FOR; + motor[TIRE_BR].pwm = slow; + motor[TIRE_BR].dir = BACK; + motor[TIRE_BL].pwm = slow; + motor[TIRE_BL].dir = FOR; + if(g[2]==0) { + countss=0; + cross=0; + mode=20; + } + } + /* if(mode==1) {//スタートゾーンから白線検知 fast=40; normal=30; @@ -2092,7 +2121,9 @@ cross=0; mode=20; } - } else if(mode==20) { + } + */ + if(mode==20) { solenoid.solenoid4= SOLENOID_ON; switch(g[2]) { case 98:
--- a/System/Process/Process.h Tue Nov 05 08:38:32 2019 +0000 +++ b/System/Process/Process.h Tue Nov 05 20:42:28 2019 +0000 @@ -12,17 +12,18 @@ #define TIRE_FR 3 #define MOTOR_0 4 -#define StertSW LimitSw::IsPressed(12) //スタートスイッチ +#define DOLS LimitSw::IsPressed(0) //上下機構下部リミット +#define LIB LimitSw::IsPressed(1) //フェンス用リミット2 #define ZoneSW LimitSw::IsPressed(2) //赤・青ゾーン用スイッチ #define ThSW LimitSw::IsPressed(3) //シーツタオルスイッチ -#define DWSW LimitSw::IsPressed(15) //上下機構上移動スイッチ -#define DOSW LimitSw::IsPressed(14) //上下機構下移動スイッチ -#define AIRSW LimitSw::IsPressed(4) //エアートリガー +#define AIRSW LimitSw::IsPressed(4) //エアートリガー +#define UPLS2 LimitSw::IsPressed(5) //上下機構リミット2 +#define LIDAR LimitSw::IsPressed(7) //ライダー壁検知用ピン +#define LIF LimitSw::IsPressed(10) //フェンス用リミット1 #define UPLS LimitSw::IsPressed(11) //上下機構リミット1 -#define UPLS2 LimitSw::IsPressed(5) //上下機構リミット2 -#define YELLOW LimitSw::IsPressed(13) //掛けるときのライントレース切り替え -#define LIF LimitSw::IsPressed(10) //フェンス用リミット1 -#define LIB LimitSw::IsPressed(1) //フェンス用リミット2 -#define DOLS LimitSw::IsPressed(0) //上下機構下部リミット +#define StertSW LimitSw::IsPressed(12) //スタートスイッチ +#define YELLOW LimitSw::IsPressed(13) //掛けるときのライントレース切り替え +#define DOSW LimitSw::IsPressed(14) //上下機構下移動スイッチ +#define DWSW LimitSw::IsPressed(15) //上下機構上移動スイッチ #endif