Commit Graph

4 Commits

Author SHA1 Message Date
Pau Espin e8bbcbf5b8 Create core directory to contain most of code not in object classes used by tests
Change-Id: I9aec6c55ccd71894182057d36e0025b69925d314
2020-04-11 19:15:53 +02:00
Pau Espin 7f4807a4bc powersupply_sispm: Add port number to log name
This way it can easily be spotted which port is being triggered in case
someone wants to manually test it.

Change-Id: Ibd2c70170d97a786e37b6838b1ed6d4eb637ad8b
2018-05-28 13:04:42 +02:00
Pau Espin 9a4631c789 Drop event_loop global functions and import MainLoop
Take the chance to identify and drop modules importing event_loop but
not using it.

Change-Id: Ifa1940cd00138ebc72fbcfd45a0e28246f7a5ed9
2018-04-04 12:38:09 +02:00
Pau Espin 19c508c304 Introduce PowerSupply interface and PowerSupplySispm
File powersupply.py defines the interface to be used by child classes
implementing it. It also provides helpers to allocate a child class
based on configuration provided ('type' field).

File powersupply_sispm.py is an implementation using pysispm [1], as it's
the one used to control the programmable power socket we have right now.

This kind of class will be used in later commits by Nanobts class, as we
want to poweroff the Nanobts completelly when not in use.

Using it requires the following extra dependencies:
$ apt-get install python3-usb
$ pip3 install pysispm

Related: OS#3040

[1] https://github.com/xypron/pysispm

Change-Id: I981c260eca1a61657147e6d83b4226618088223c
2018-03-15 19:54:36 +01:00