Re #183: Kilo robot headlight handling
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@4465 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 1b0bf1b93ccf7b967925ab967641ae240a09b44f Former-commit-id: 6b3269ee7455ca39d0ce8799172fcb50f7850199
This commit is contained in:
parent
4ab84c35cf
commit
4be6d049be
1 changed files with 5 additions and 2 deletions
|
@ -1697,10 +1697,13 @@ void KDriver::SetMode(int newmode) {
|
|||
current_light = RM_LIGHT_HEAD2;
|
||||
break;
|
||||
case AVOIDING:
|
||||
current_light = RM_LIGHT_HEAD1;
|
||||
if (static_cast<int>(current_sim_time_ * 2.0) % 2 == 0)
|
||||
current_light = RM_LIGHT_HEAD1 | RM_LIGHT_HEAD2;
|
||||
else
|
||||
current_light = RM_LIGHT_HEAD1;
|
||||
break;
|
||||
default:
|
||||
current_light = RM_LIGHT_HEAD1 | RM_LIGHT_HEAD2;
|
||||
current_light = RM_LIGHT_HEAD1;
|
||||
break;
|
||||
}
|
||||
} // mode_ != newmode
|
||||
|
|
Loading…
Reference in a new issue