-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
66 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Improving Configuration | ||
|
||
Explain how to break our global variables into config.yaml. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Adding Handlers | ||
|
||
Explain how to impliment custome trace handlers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Trace File Formats | ||
|
||
explain how to add trace file formats |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,58 @@ | ||
# Configuration | ||
# Defining I/O | ||
|
||
Although our `main` function is currently empty, let's create a `config.yaml` file to store setup variables for the application. We will then pass a path to this config when we run the SIL application. | ||
Inside the `sil/pinout` directory, we will establish the physical input and output pins our ECU's | ||
|
||
## Create a config | ||
```go | ||
package pinout | ||
|
||
Create a `config.yaml` file inside the `sil/config` directory. | ||
//go:generate enumer -type=PhysicalIo "physicalio.go" | ||
|
||
```yaml | ||
revision: "sil" | ||
canInterfaces: | ||
veh: "vcan0" | ||
pt: "vcan1" | ||
resultsDir: "/abs/path/to/sil/results" | ||
logsDir: "/abs/path/to/sil/results/logs" | ||
tagsFilePath: "/abs/path/to/sil/config/tags.yaml" | ||
canTracerTimeoutMinutes: 10 | ||
silPort: 9090 | ||
``` | ||
// PhysicalIo represents an input/output in its physical meaning. | ||
type PhysicalIo int | ||
|
||
Replace these fields with | ||
const ( | ||
UnknownPhysicalIo PhysicalIo = iota | ||
|
||
// Front Controller IOs | ||
DebugLedEn | ||
DashboardEn | ||
HvilLedEn | ||
BrakeLightEn | ||
StatusLedEn | ||
RtdsEn | ||
AccelPedalPosition1 | ||
AccelPedalPosition2 | ||
SteeringAngle | ||
StartButtonN | ||
WheelSpeedLeftA | ||
WheelSpeedLeftB | ||
WheelSpeedRightA | ||
WheelSpeedRightB | ||
|
||
// LV Controller IOs | ||
MotorControllerPrechargeEn // Digital output from LV controller, read as digital input | ||
InverterSwitchEn // Digital output from LV controller, read as digital input | ||
AccumulatorEn // Digital output from LV controller, read as digital input | ||
ShutdownCircuitEn // Digital output from LV controller, read as digital input | ||
TsalEn | ||
RaspiEn | ||
FrontControllerEn | ||
SpeedgoatEn | ||
MotorControllerEn | ||
ImuGpsEn | ||
DcdcEn | ||
DcdcValid | ||
|
||
// Test bench control IOs | ||
HvCurrentSense // Current through the accumulator (electrical signal only) | ||
LvController3v3RefVoltage // Connected to 3.3V touch point on LV controller | ||
FrontController3v3RefVoltage // Connected to 3.3V touch point on front controller | ||
HvilDisable // Disables HVIL on the test bench | ||
HvilFeedback // Reads back HVIL circuit voltage on the testbench (max 5V) | ||
GlvmsDisable // Disables power to the test bench | ||
|
||
// Demo Project IOs | ||
IndicatorLed | ||
IndicatorButton | ||
) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters