I've been debugging some issues where the device would measure incorrect results.
Conclusion was that if the output voltage was not set the self.current_vdd is 0 and then the get_adc_results would return incorrect value(I assume) as it uses that for calculating the result
I am unsure how this affect the device when in ampere mode.
There should be a exception telling the user this as it is really confusing. I've added this to my function:
if not self.current_vdd and self.mode == PPK2_Modes.SOURCE_MODE:
raise Exception("Output voltage not set")
I've been debugging some issues where the device would measure incorrect results. Conclusion was that if the output voltage was not set the self.current_vdd is 0 and then the get_adc_results would return incorrect value(I assume) as it uses that for calculating the result
I am unsure how this affect the device when in ampere mode.
There should be a exception telling the user this as it is really confusing. I've added this to my function: if not self.current_vdd and self.mode == PPK2_Modes.SOURCE_MODE: raise Exception("Output voltage not set")