Move to poetry
This commit is contained in:
parent
2e149a730a
commit
5a2ad122f5
|
@ -0,0 +1,16 @@
|
|||
# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand.
|
||||
|
||||
[[package]]
|
||||
name = "docopt"
|
||||
version = "0.6.2"
|
||||
description = "Pythonic argument parser, that will make you smile"
|
||||
optional = false
|
||||
python-versions = "*"
|
||||
files = [
|
||||
{file = "docopt-0.6.2.tar.gz", hash = "sha256:49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491"},
|
||||
]
|
||||
|
||||
[metadata]
|
||||
lock-version = "2.0"
|
||||
python-versions = "^3.11"
|
||||
content-hash = "020d3e03335e70ca8b1cfd769838e50546a63b9ed4e4034ba584fd3a3ec497fd"
|
|
@ -54,9 +54,21 @@ def value_linear(obj, step):
|
|||
return delta * (100-step)/50 + obj.min
|
||||
|
||||
|
||||
def value_vshape(obj, step):
|
||||
"""
|
||||
V-shape value, 1-0-1
|
||||
"""
|
||||
|
||||
delta = obj.max - obj.min
|
||||
if step < 50:
|
||||
return delta * (100-step)/50 + obj.min
|
||||
else:
|
||||
return delta*step/50 + obj.min
|
||||
|
||||
|
||||
def value_sin(obj, step):
|
||||
"""
|
||||
Sinusoidal values, 0-1-0 /\
|
||||
Sinusoidal values, 0-1-0
|
||||
"""
|
||||
|
||||
delta = obj.max - obj.min
|
||||
|
@ -66,7 +78,7 @@ def value_sin(obj, step):
|
|||
|
||||
def value_cos(obj, step):
|
||||
"""
|
||||
Absolute Cosinusoidal values, 1-0-1 \\//
|
||||
Absolute Cosinusoidal values, 1-0-1
|
||||
"""
|
||||
|
||||
delta = obj.max - obj.min
|
||||
|
|
|
@ -10,7 +10,7 @@ from .methods import * # NOQA
|
|||
class ledPulse(threading.Thread):
|
||||
|
||||
delayMethods = ['constant', 'sin', 'cos']
|
||||
valueMethods = ['on', 'off', 'linear', 'sin', 'cos']
|
||||
valueMethods = ['on', 'off', 'linear', 'vshape', 'sin', 'cos']
|
||||
methods = {'delay': {}, 'value': {}}
|
||||
|
||||
defaultSet = {
|
||||
|
@ -69,7 +69,7 @@ class ledPulse(threading.Thread):
|
|||
self.model = sys.platform
|
||||
try:
|
||||
with open('/sys/firmware/devicetree/base/model', 'r') as m:
|
||||
model = m.read()
|
||||
model = m.read().strip()
|
||||
if model.lower().startswith('raspberry pi'):
|
||||
self.supported = True
|
||||
self.model = model
|
||||
|
|
|
@ -1,6 +1,15 @@
|
|||
[build-system]
|
||||
requires = ["setuptools", "wheel"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
[tool.poetry]
|
||||
name = "pulses"
|
||||
version = "0.90"
|
||||
description = "Pulse LEDs on RPi"
|
||||
authors = ["Andrea Mistrali <andrea@mistrali.pw>"]
|
||||
readme = "README.md"
|
||||
|
||||
[tool.pyright]
|
||||
reportMissingImports = "information"
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.11"
|
||||
docopt = "^0.6.2"
|
||||
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
|
|
Loading…
Reference in New Issue