Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: GlasgowEmbedded/glasgow
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 20356d301aaa
Choose a base ref
...
head repository: GlasgowEmbedded/glasgow
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 469bbee13767
Choose a head ref
  • 3 commits
  • 3 files changed
  • 1 contributor

Commits on Sep 23, 2019

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    e43966a View commit details
  2. Copy the full SHA
    26e4314 View commit details
  3. applet.video.ws2812_output: fix argument parsing.

    And fix tests too.
    whitequark committed Sep 23, 2019
    Copy the full SHA
    469bbee View commit details
2 changes: 1 addition & 1 deletion software/glasgow/applet/audio/dac/__init__.py
Original file line number Diff line number Diff line change
@@ -229,4 +229,4 @@ async def interact(self, device, args, pcm_iface):
class AudioDACAppletTestCase(GlasgowAppletTestCase, applet=AudioDACApplet):
@synthesis_test
def test_build(self):
self.assertBuilds()
self.assertBuilds(args=["--unsigned"])
8 changes: 6 additions & 2 deletions software/glasgow/applet/audio/yamaha_opl/__init__.py
Original file line number Diff line number Diff line change
@@ -982,5 +982,9 @@ async def write_pcm(input_queue):

class AudioYamahaOPLAppletTestCase(GlasgowAppletTestCase, applet=AudioYamahaOPLApplet):
@synthesis_test
def test_build(self):
self.assertBuilds()
def test_build_opl2(self):
self.assertBuilds(args=["--device", "OPL2"])

@synthesis_test
def test_build_opl3(self):
self.assertBuilds(args=["--device", "OPL3"])
18 changes: 13 additions & 5 deletions software/glasgow/applet/video/ws2812_output/__init__.py
Original file line number Diff line number Diff line change
@@ -133,10 +133,6 @@ def add_build_arguments(cls, parser, access):
parser.add_argument(
"-c", "--count", metavar="N", type=int, required=True,
help="set the number of LEDs per string")
parser.add_argument(
"-b", "--buffer", metavar="N", type=int, default=16,
help="set the number of frames to buffer internally (buffered twice)")
ServerEndpoint.add_argument(parser, "endpoint")

def build(self, target, args):
self.mux_interface = iface = target.multiplexer.claim_interface(self, args)
@@ -149,10 +145,22 @@ def build(self, target, args):

return subtarget

@classmethod
def add_run_arguments(cls, parser, access):
super().add_run_arguments(parser, access)

parser.add_argument(
"-b", "--buffer", metavar="N", type=int, default=16,
help="set the number of frames to buffer internally (buffered twice)")

async def run(self, device, args):
buffer_size = len(args.pin_set_out) * args.count * 3 * args.buffer
return await device.demultiplexer.claim_interface(self, self.mux_interface, args, write_buffer_size=buffer_size)

@classmethod
def add_interact_arguments(cls, parser):
ServerEndpoint.add_argument(parser, "endpoint")

async def interact(self, device, args, leds):
frame_size = len(args.pin_set_out) * args.count * 3
buffer_size = frame_size * args.buffer
@@ -174,4 +182,4 @@ async def interact(self, device, args, leds):
class VideoWS2812OutputAppletTestCase(GlasgowAppletTestCase, applet=VideoWS2812OutputApplet):
@synthesis_test
def test_build(self):
self.assertBuilds(args=["--port", "A"])
self.assertBuilds(args=["--pins-out", "0:3", "-c", "1024"])