Skip to content

Commit 50922a7

Browse files
committed
added debugging snippet in GUI tool
1 parent 30608fd commit 50922a7

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/gui/main/FirmwareUploader.go

+11-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
package main
2121

2222
import (
23+
"bytes"
2324
"certificates"
25+
"errors"
2426
"flasher"
2527
_ "fmt"
2628
"github.com/google/gxui"
@@ -29,12 +31,11 @@ import (
2931
"github.com/google/gxui/math"
3032
"github.com/google/gxui/samples/flags"
3133
"go.bug.st/serial"
34+
_ "io/ioutil"
3235
"log"
3336
"strconv"
3437
"strings"
3538
"time"
36-
"bytes"
37-
"errors"
3839
)
3940

4041
var payloadSize uint16
@@ -310,6 +311,14 @@ func uploadCertificates(portName string, driver gxui.Driver, updateProgress func
310311
return
311312
}
312313

314+
// For debugging puporses
315+
/*
316+
if err := ioutil.WriteFile("cert_output.bin", convertedCers, 0644); err != nil {
317+
updateProgress(err.Error(), -1)
318+
return
319+
}
320+
*/
321+
313322
updateProgress("Upload completed!", 100)
314323
}
315324

0 commit comments

Comments
 (0)