mirror of
https://github.com/Fishwaldo/go-dcdc200.git
synced 2025-03-15 11:31:22 +00:00
Add Default File for Capture Replay
This commit is contained in:
parent
2909a70459
commit
cfe9aa0ae4
4 changed files with 3 additions and 2 deletions
|
@ -49,8 +49,8 @@ func main() {
|
||||||
|
|
||||||
dc := dcdcusb.DcDcUSB{}
|
dc := dcdcusb.DcDcUSB{}
|
||||||
if *simulation {
|
if *simulation {
|
||||||
if err := sim.SetCaptureFile("dcdcusb.txt"); err != nil {
|
if err := sim.SetCaptureFile("dcdcusb.cap"); err != nil {
|
||||||
fmt.Printf("Can't open Capture File dcdcusb.txt: %s\n", err)
|
fmt.Printf("Can't open Capture File dcdcusb.cap: %s\n", err)
|
||||||
os.Exit(-1)
|
os.Exit(-1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,6 +133,7 @@ func (dc *DcDcUSB) Init(log logadapter.Logger, simulation bool) {
|
||||||
if !simulation {
|
if !simulation {
|
||||||
dc.usbif = realusb.Init(dc.log)
|
dc.usbif = realusb.Init(dc.log)
|
||||||
} else {
|
} else {
|
||||||
|
sim.SetCaptureFile("dcdcusb.cap")
|
||||||
dc.usbif = sim.Init(dc.log)
|
dc.usbif = sim.Init(dc.log)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue