@@ -131,42 +131,39 @@ def poll_status(self, channel: int):
131131 result .update (s )
132132 return result
133133
134- def set_ocp (self , channel : int ):
135- self .t .write_line ('OCP1' )
134+ def set_ocp (self , channel : int , value ):
135+ if value is "ON" :
136+ self .t .write_line ('OCP1' )
137+ elif value is "OFF" :
138+ self .t .write_line ('OCP0' )
136139 return self .t .read_until_reol (1024 )
137140
138- def unset_ocp (self , channel : int ):
139- self .t .write_line ('OCP0' )
141+ def set_ovp (self , channel : int , value ):
142+ if value is "ON" :
143+ self .t .write_line ('OVP1' )
144+ elif value is "OFF" :
145+ self .t .write_line ('OVP0' )
140146 return self .t .read_until_reol (1024 )
141-
142- def set_ovp (self , channel : int ):
143- self .t .write_line ('OVP1' )
144- return self .t .read_until_reol (1024 )
145-
146- def unset_ovp (self , channel : int ):
147- self .t .write_line ('OVP0' )
148- return self .t .read_until_reol (1024 )
149-
147+
150148 def set_output (self , channel : int , value ):
151149 if value == 'ON' :
152150 self .t .write_line ('OUT1' )
153151 else :
154152 self .t .write_line ('OUT0' )
155153 return self .t .read_until_reol (1024 )
156154
157- def set_beep (self , channel : int ): #doesnt work
158- self .t .write_line ('BEEP1' )
159- return self .t .read_until_reol (1024 )
160-
161- def unset_beep (self , channel : int ): #doesnt work
162- self .t .write_line ('BEEP0' )
155+ def set_beep (self , channel : int , value ): #doesnt work
156+ if value == "ON" :
157+ self .t .write_line ('BEEP1' )
158+ elif value == "OFF" :
159+ self .t .write_line ('BEEP0' )
163160 return self .t .read_until_reol (1024 )
164161
165- def save_memory (self , channel : int , bank ): #bank 1-5 - doesnt work
162+ def set_memory_save (self , channel : int , bank ): #bank 1-5 - doesnt work
166163 self .t .write_line ('SAV' + str (bank ))
167164 return self .t .read_until_reol (1024 )
168165
169- def recall_memory (self , channel : int , bank ): #bank 1-5
166+ def set_memory_read (self , channel : int , bank ): #bank 1-5
170167 self .t .write_line ('RCL' + str (bank ))
171168 self .t .read_until_reol (1024 )
172169 return
0 commit comments