Closed vaibhavarora102 closed 3 years ago
@bessman
I didn't get this point
Individual instruments should not have their own connect methods.
rest had tried to do kindly check
The serial communication should be handled by a PSL.packet_handler.Handler instance. The PowerSupply class should accept such an instance as an optional initialization argument. If no Handler object is provided, PowerSupply should create a new instance and use that for communication.
Take a look at for example the Oscilloscope for an example of how this works in other modules.
Also, please have a look at the Travis and Codacy errors and fix them.
Hi @bessman in Oscilloscope, I guess you were stating to self._device to use for set, get and other communications but in power supply, we are using self.DAC from MCP4728, so should I use self._device and further proceed directly using MCP4728 in place of self.DAC or something else, can you please help?
can you please give a bit of insight that what exactly travis and codeacy errors are for thanks
In order for the PowerSupply to be able to talk to the PSLab and tell it what to do, it requires a serial interface. The Handler provides this interface. In the PowerSupply's case, the low level communication happens in the MCP4728 class, which takes a Handler instance as its first argument. The PowerSupply should accept a Handler instance (or create a new one), and hand it to the MCP4728.
Codacy is just complaining about a trailing white space on L432. Simply remove it to make Codacy happy.
Travis fails because the connect
method is on the wrong indentation level. As discussed above, you should remove the connect
method completely rather than fix it. You also have another indentation error on L36.
Hi @bessman Thanks for your patience and guidance
But I would not be able to continue due to university exams So, kindly assign
Thanks
Thanks for giving this a try. I'm closing this now, as it is superseded by #158.
In respect to issue #127 Had split the sciencelab class into the subcategory of power_suppply Till now had added made change in sciencelab.py and had made power_supply.py