File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ def __init__(self, port):
6868 self .vdd_low = 800
6969 self .vdd_high = 5000
7070
71- self .current_vdd = 0
71+ self .current_vdd = None
7272
7373 self .adc_mult = 1.8 / 163840
7474
@@ -229,11 +229,17 @@ def get_modifiers(self):
229229 return ret
230230
231231 def start_measuring (self ):
232- """Start continous measurement"""
232+ """Start continuous measurement"""
233+ if not self .current_vdd :
234+ if self .mode == PPK2_Modes .SOURCE_MODE :
235+ raise Exception ("Output voltage not set!" )
236+ if self .mode == PPK2_Modes .AMPERE_MODE :
237+ raise Exception ("Input voltage not set!" )
238+
233239 self ._write_serial ((PPK2_Command .AVERAGE_START , ))
234240
235241 def stop_measuring (self ):
236- """Stop continous measurement"""
242+ """Stop continuous measurement"""
237243 self ._write_serial ((PPK2_Command .AVERAGE_STOP , ))
238244
239245 def set_source_voltage (self , mV ):
You can’t perform that action at this time.
0 commit comments