Merge remote-tracking branch 'origin/main' into wrap

This commit is contained in:
Jeff Epler 2022-04-06 08:42:07 -05:00
commit 7110473f04
No known key found for this signature in database
GPG key ID: D5BF15AB975AB4DE
12 changed files with 8 additions and 4 deletions

View file

@ -4,7 +4,7 @@
repos:
- repo: https://github.com/python/black
rev: 20.8b1
rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/fsfe/reuse-tool

View file

@ -8,8 +8,12 @@
# Required
version: 2
build:
os: ubuntu-20.04
tools:
python: "3"
python:
version: "3.x"
install:
- requirements: docs/requirements.txt
- requirements: requirements.txt

View file

@ -98,7 +98,7 @@ class Program: # pylint: disable=too-few-public-methods
if sideset_count == 0:
raise RuntimeError("No side_set count set")
sideset_value = int(instruction[-1])
if sideset_value >= 2 ** sideset_count:
if sideset_value >= 2**sideset_count:
raise RuntimeError("Sideset value too large")
delay |= sideset_value << (5 - sideset_count - sideset_enable)
delay |= sideset_enable << 4

View file

@ -19,7 +19,7 @@ length = 8000 // 440
# signed 16 bit
s16 = array.array("h", [0] * length)
for i in range(length):
s16[i] = int(math.sin(math.pi * 2 * i / length) * (2 ** 15))
s16[i] = int(math.sin(math.pi * 2 * i / length) * (2**15))
print(s16[i])
program = """