ジャパンオープン用のLPC824専用プログラム
Dependencies: mbed-src Ping SDFileSystem
Diff: main/format.cpp
- Revision:
- 2:83b8bf9f0ea1
- Parent:
- 1:ea7307724f1c
- Child:
- 3:8ef3afcf4ade
--- a/main/format.cpp Sun Feb 28 06:38:03 2016 +0000 +++ b/main/format.cpp Wed Mar 02 08:11:47 2016 +0000 @@ -137,6 +137,9 @@ call.fall(&emergency); for(i=0; i<IC_NUM; i++) cs[i]=1; + + ir_val_phase[IR_SHORT] = DIS_7; + ir_val_phase[IR_LONG] = DIS_7; while(1) { //全ての素子の値を検出 num_short=0; @@ -180,7 +183,6 @@ //short - ir_val_phase[IR_SHORT] = DIS_7; if(ir_val_short[11]>=ir_dis_range[IR_SHORT][DIS_7]){ ir_val_phase[IR_SHORT] = DIS_7; @@ -208,7 +210,6 @@ } //long - ir_val_phase[IR_LONG] = DIS_7; if(ir_val_long[7]>=ir_dis_range[IR_LONG][DIS_7]){ ir_val_phase[IR_LONG] = DIS_7; @@ -282,16 +283,19 @@ //デバッグ用のTeraTermへの出力 - /* pc.printf("val_short:%d\t", ir_val_short[11]);//最小検出値(近) pc.printf("val_long:%d\t", ir_val_long[7]);//最小検出値(遠) pc.printf("state_short:%d\t", ir_position[0]);//ボール位置(近) pc.printf("state_long:%d\t", ir_position[1]);//ボール位置(遠) - pc.printf("Diff_short:%d\t", ir_val_short[0]-ir_val_short[11]);//検出した最大値と最小値の差(近) - pc.printf("Diff_long:%d\t", ir_val_long[0]-ir_val_long[7]);//検出した最大値と最小値の差(遠) - pc.printf("notice:%d\t", ir_notice);//判定されたボールの状況 + //pc.printf("Diff_short:%d\t", ir_val_short[0]-ir_val_short[11]);//検出した最大値と最小値の差(近) + //pc.printf("Diff_long:%d\t", ir_val_long[0]-ir_val_long[7]);//検出した最大値と最小値の差(遠) + + pc.printf("ir_val_phase[IR_SHORT]:%d\t", ir_val_phase[IR_SHORT]);//判定されたボールの距離の段階(遠) + pc.printf("ir_val_phase[IR_LONG]:%d\t", ir_val_phase[IR_LONG]);//判定されたボールの距離の段階(遠) + + //pc.printf("notice:%d\t", ir_notice);//判定されたボールの状況 pc.printf("\r\n"); - */ + /* pc.printf("%Value is "); pc.printf("Dirr_short is %d\t", ir_val_short[0]-ir_val_short[11]);//検出した最大値と最小値の差(近)