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 AQM1602 HMC6352 PID
Diff: main_processing/strategy/strategy.cpp
- Revision:
- 31:745a775cfc20
- Parent:
- 30:5998ba42237e
- Child:
- 32:367b16d69a32
--- a/main_processing/strategy/strategy.cpp Wed Mar 23 11:25:22 2016 +0000
+++ b/main_processing/strategy/strategy.cpp Wed Mar 23 13:01:43 2016 +0000
@@ -374,7 +374,7 @@
//sys.HomeStayFlag[X_PING]=1;
}
//y
- if((data.ping[B_PING]>40)&&(1)&&(sys.HomeStayFlag[Y_PING]==0)){
+ if((data.ping[B_PING]>60)&&(1)&&(sys.HomeStayFlag[Y_PING]==0)){
ir_y = -1;
}
else{
@@ -386,10 +386,17 @@
ir_x = (ir_x_dir + ir_x_turn);
ir_y = (ir_y_dir + ir_y_turn);
}
+ if((sys.HomeBlind==0)&&(data.irNotice==IR_FAR)){
+ ir_pow_x = ir_pow_y = 25;
+ if(ir_y>0) ir_y=0;
+ if((data.ping[B_PING]>60)&&(1)){
+ ir_y = -1;
+ }
+ }
if(
(sys.DefenceFlag==1)&&
(ir_y>0)&&
- (data.ping[B_PING]>40)&&
+ (data.ping[B_PING]>60)&&
(data.ping[B_PING]<225)&&
(sys.BackHomeFlag==0)
){