@@ -91,11 +91,11 @@ func (c *Controller) Command(format string, a ...any) error {
9191 if a != nil {
9292 cmd = fmt .Sprintf (format , a ... )
9393 }
94- log .Printf ("sending cmd (terminator not yet added): %#v" , cmd )
94+ // log.Printf("sending cmd (terminator not yet added): %#v", cmd)
9595 // TODO: Why am I trimming whitespace and adding the USB terminator here if
9696 // I'm calling the WriteString method, which does that as well?
9797 cmd = fmt .Sprintf ("%s%c" , strings .TrimSpace (cmd ), c .usbTerm )
98- log .Printf ("sending cmd (with terminator added): %#v" , cmd )
98+ // log.Printf("sending cmd (with terminator added): %#v", cmd)
9999 _ , err := fmt .Fprint (c .rw , cmd )
100100 return err
101101}
@@ -110,29 +110,25 @@ func (c *Controller) Command(format string, a ...any) error {
110110// change the GPIB terminator use the SetGPIBTermination method.
111111func (c * Controller ) Query (cmd string ) (string , error ) {
112112 cmd = fmt .Sprintf ("%s%c" , strings .TrimSpace (cmd ), c .usbTerm )
113- log .Printf ("sending query cmd: %#v" , cmd )
113+ // log.Printf("sending query cmd: %#v", cmd)
114114 _ , err := fmt .Fprint (c .rw , cmd )
115115 if err != nil {
116116 return "" , fmt .Errorf ("error writing command: %s" , err )
117117 }
118118 // If read-after-write is disabled, need to tell the Prologix controller to
119119 // read.
120120 if ! c .auto {
121- log .Print ("not configured for auto" )
122121 readCmd := "++read eoi"
123122 _ , err = fmt .Fprintf (c .rw , "%s%c" , readCmd , c .usbTerm )
124123 if err != nil {
125124 return "" , fmt .Errorf ("error sending `%s` command: %s" , readCmd , err )
126125 }
127126 }
128- log .Print ("checkpoint_rb: about to read buffer" )
129- log .Printf ("eot char = %#v" , c .eotChar )
130127 s , err := bufio .NewReader (c .rw ).ReadString (c .eotChar )
131128 if err == io .EOF {
132129 log .Printf ("found EOF" )
133130 return s , nil
134131 }
135- log .Print ("read buffer" )
136132 return s , err
137133}
138134
0 commit comments