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.
Dependencies: mbed YKNCT_Movement SBDBT BNO055 YKNCT_MD YKNCT_I2C
Diff: main.cpp
- Revision:
- 18:61d3a2b78aee
- Parent:
- 17:5b4080915375
- Child:
- 19:0840e182f96d
--- a/main.cpp Thu Mar 19 05:01:52 2020 +0000 +++ b/main.cpp Thu Mar 19 06:30:59 2020 +0000 @@ -439,24 +439,21 @@ if(Last_val==1) val_x+=10; } - /* どちらかがラインに乗っている状態 */ - if(In.Get(2)==1||In.Get(3)==1) { - /* 左側のみ */ - if(In.Get(2)==1&&In.Get(3)==0) { - val_x-=10; - Last_val=0; - } - /* 右側のみ */ - else if(In.Get(2)==0&&In.Get(3)==1) { - val_x+=10; - Last_val=1; - } - /* どちらも乗っている */ - else - /* フラグ回収 */ - LineFlag=0; + /* 左側のみ */ + if(In.Get(2)==1&&In.Get(3)==0) { + val_x-=10; + Last_val=0; + } + /* 右側のみ */ + else if(In.Get(2)==0&&In.Get(3)==1) { + val_x+=10; + Last_val=1; + } + /* どちらも乗っている */ + else + /* フラグ回収 */ + LineFlag=0; - } SubOmuni(val_x,0,0);