Screenshot before taking readings

This commit is contained in:
Ben Charlton 2018-08-14 18:08:50 +01:00
parent 1b938031f3
commit d2b911920f

View file

@ -46,11 +46,7 @@ func main() {
tstart := time.Now() tstart := time.Now()
result := queryScope(conn, toRun) // Collect and write screenshot if the screen flag is set. Do this first because queries can take a little while.
// Return from scope is semicolon separated, so just switch for commas.
result = strings.Replace(result, ";", ", ", -1)
// Collect and write screenshot if the screen flag is set.
if *fScreen { if *fScreen {
img := getScreenshot(conn) img := getScreenshot(conn)
if img != nil { if img != nil {
@ -58,6 +54,10 @@ func main() {
} }
} }
result := queryScope(conn, toRun)
// Return from scope is semicolon separated, so just switch for commas.
result = strings.Replace(result, ";", ", ", -1)
// Clear history // Clear history
if *fClear { if *fClear {
fmt.Fprintf(conn, ":CLE;MEAS:STAT:RES\n") fmt.Fprintf(conn, ":CLE;MEAS:STAT:RES\n")