Block Name | Comment |
---|---|
<S1>/ModeIn | Inport |
<S1>/RPort_Distance_val | Inport |
<S1>/RPort_VehicleSpeed_val | Inport |
<S1>/RPort_LightIntensity_val | Inport |
<S1>/function | TriggerPort |
<S1>/PPort_Lamps_val | Outport |
<S2>/RPort_Mode_val | Inport |
<S2>/RPort_KeySW_state | Inport |
<S2>/function | TriggerPort |
<S2>/ModeOut | Outport |
<S3>:1 | EMChart eliminated by optimization |
Object Name | Code Location |
---|---|
<S1>/MATLAB Function | HighBeamAssist.c:59, 65, 66, 67, 68, 71, 72, 73, 76, 77, 78, 79, 80, 81, 83, 84, 87, 88, 93, 94, 98 |
Object Name | Code Location |
---|---|
<S2>/Constant | HighBeamAssist.c:33, 40 |
<S2>/Switch | HighBeamAssist.c:32, 37, 38, 40, 44, 46 |
Script | Code Location | |
---|---|---|
1 | function Lamps = fcn(ModeIn, Distance ... | |
3 | if ModeIn == HeadlampModes.Highbeam | |
4 | Lamps = [false, true]; | |
5 | elseif ModeIn == HeadlampModes.Lowbeam | |
6 | Lamps = [true, false]; | |
7 | elseif ModeIn == HeadlampModes.Auto | |
8 | if (VehicleSpeed > 40) | |
9 | if (Distance > 10) && (Intens ... | |
10 | Lamps = [false, true]; | |
11 | else | |
12 | Lamps = [true, false]; | |
13 | end | |
14 | else | |
15 | Lamps = [true, false]; | |
16 | end | |
17 | else | |
18 | Lamps = [false, false]; | |
19 | end | |
20 |