New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pulled in baud rate and PiGPIO user PRs #84
Conversation
Travis fails! Commit name is totally opaque - could be anything! :-P |
i know...working on it.
…On Sat, Dec 24, 2016 at 1:47 PM, Tom Swirly ***@***.***> wrote:
Travis fails!
Commit name is totally opaque - could be anything! :-P
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#84 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA6a6vVB_4Q8i0iuWlZBT2kG_yCagztNks5rLWjIgaJpZM4LVRUG>
.
|
Changed version to 3.0.0b0
e57c371
to
91b4500
Compare
@rec - There. Fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, I think of this as three several commits, but I might be happy if you just changed the version number in a different commit.
@@ -20,6 +22,7 @@ def _render(self): | |||
newBuf[3::4] = self._buf[2::3] | |||
self._buf[:] = [0, 0, 0, 0] + newBuf | |||
self._buf.extend([0xFF, 0, 0, 0] * self._latchBytes) | |||
print(list(self._buf)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops!
@@ -3,4 +3,4 @@ | |||
|
|||
from . import animation, colors, font, gamma, led, log, util | |||
|
|||
__version__ = VERSION = '2.0.10' | |||
__version__ = VERSION = '3.0.0b0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should really be a different separate CL!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah yeah yeah.... 📦
def __init__(self, num, c_order=ChannelOrder.RGB, use_py_spi=True, | ||
dev="/dev/spidev0.0", SPISpeed=1, open=open): | ||
def __init__(self, num, c_order=ChannelOrder.RGB, interface=SPIInterface.PY_SPI, | ||
dev="/dev/spidev0.0", SPISpeed=1, open=open, exists=exists): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just discovered this: https://github.com/jmcgeheeiv/pyfakefs- a fake filesystem for unit tests!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm... cool. Will look into pulling that in. Will leave this way for now.
s = d.split('.') | ||
if len(s) == 2: | ||
self.numSPI = int(s[0]) | ||
self.numCS = int(s[1]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If s doesn't length 2, you fail, silently!
I'd go with self.numSPI, self.numCS = (int(i) for i in s)
which throws an exception
@@ -69,8 +74,8 @@ def test_gamma1(self): | |||
|
|||
def test_apa102(self): | |||
driver = DriverAPA102(num=4, **self.SPD) | |||
expected = [0, 0, 0, 0, 255, 0, 0, 0, 255, 1, 8, 64, | |||
255, 2, 16, 128, 255, 3, 24, 192, 255, 0, 0, 0] | |||
expected = [0, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 8, 255, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoa, why the huge change here? what happened?
Off to see family, will fix all this up after I get back on Tuesday.
…On Sun, Dec 25, 2016 at 10:32 AM, Tom Swirly ***@***.***> wrote:
***@***.**** commented on this pull request.
Overall, I think of this as three several commits, but I might be happy if
you just changed the version number in a different commit.
------------------------------
In bibliopixel/drivers/APA102.py
<#84 (review)>
:
> @@ -20,6 +22,7 @@ def _render(self):
newBuf[3::4] = self._buf[2::3]
self._buf[:] = [0, 0, 0, 0] + newBuf
self._buf.extend([0xFF, 0, 0, 0] * self._latchBytes)
+ print(list(self._buf))
Oops!
------------------------------
In bibliopixel/__init__.py
<#84 (review)>
:
> @@ -3,4 +3,4 @@
from . import animation, colors, font, gamma, led, log, util
-__version__ = VERSION = '2.0.10'
+__version__ = VERSION = '3.0.0b0'
This should really be a different separate CL!
------------------------------
In bibliopixel/drivers/WS2801.py
<#84 (review)>
:
> from .. import gamma
class DriverWS2801(DriverSPIBase):
"""Main driver for WS2801 based LED strips on devices like the Raspberry Pi and BeagleBone"""
- def __init__(self, num, c_order=ChannelOrder.RGB, use_py_spi=True,
- dev="/dev/spidev0.0", SPISpeed=1, open=open):
+ def __init__(self, num, c_order=ChannelOrder.RGB, interface=SPIInterface.PY_SPI,
+ dev="/dev/spidev0.0", SPISpeed=1, open=open, exists=exists):
I just discovered this: https://github.com/jmcgeheeiv/pyfakefs- a fake
filesystem for unit tests!
------------------------------
In bibliopixel/drivers/spi_driver_base.py
<#84 (review)>
:
>
def _bootstrapSPIDev(self):
- import os.path
- import sys
- if self.use_py_spi:
+ if self.interface != SPIInterface.FILE:
+ self.numSPI, self.numCS = -1, -1
+ d = self.dev.replace("/dev/spidev", "")
+ s = d.split('.')
+ if len(s) == 2:
+ self.numSPI = int(s[0])
+ self.numCS = int(s[1])
If s doesn't length 2, you fail, silently!
I'd go with self.numSPI, self.numCS = (int(i) for i in s) which throws an
exception
------------------------------
In test/driver_test.py
<#84 (review)>
:
> @@ -69,8 +74,8 @@ def test_gamma1(self):
def test_apa102(self):
driver = DriverAPA102(num=4, **self.SPD)
- expected = [0, 0, 0, 0, 255, 0, 0, 0, 255, 1, 8, 64,
- 255, 2, 16, 128, 255, 3, 24, 192, 255, 0, 0, 0]
+ expected = [0, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 8, 255,
Whoa, why the huge change here? what happened?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#84 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA6a6nKFYSGT_UTcx7bp_efEkcnZhB8-ks5rLoyZgaJpZM4LVRUG>
.
|
Take your time!
…On 25 December 2016 at 16:49, Dread ***@***.***> wrote:
Off to see family, will fix all this up after I get back on Tuesday.
On Sun, Dec 25, 2016 at 10:32 AM, Tom Swirly ***@***.***>
wrote:
> ***@***.**** commented on this pull request.
>
> Overall, I think of this as three several commits, but I might be happy
if
> you just changed the version number in a different commit.
> ------------------------------
>
> In bibliopixel/drivers/APA102.py
> <https://github.com/ManiacalLabs/BiblioPixel/pull/
84#pullrequestreview-14364647>
> :
>
> > @@ -20,6 +22,7 @@ def _render(self):
> newBuf[3::4] = self._buf[2::3]
> self._buf[:] = [0, 0, 0, 0] + newBuf
> self._buf.extend([0xFF, 0, 0, 0] * self._latchBytes)
> + print(list(self._buf))
>
> Oops!
> ------------------------------
>
> In bibliopixel/__init__.py
> <https://github.com/ManiacalLabs/BiblioPixel/pull/
84#pullrequestreview-14364647>
> :
>
> > @@ -3,4 +3,4 @@
>
> from . import animation, colors, font, gamma, led, log, util
>
> -__version__ = VERSION = '2.0.10'
> +__version__ = VERSION = '3.0.0b0'
>
> This should really be a different separate CL!
> ------------------------------
>
> In bibliopixel/drivers/WS2801.py
> <https://github.com/ManiacalLabs/BiblioPixel/pull/
84#pullrequestreview-14364647>
> :
>
> > from .. import gamma
>
>
> class DriverWS2801(DriverSPIBase):
> """Main driver for WS2801 based LED strips on devices like the Raspberry
Pi and BeagleBone"""
>
> - def __init__(self, num, c_order=ChannelOrder.RGB, use_py_spi=True,
> - dev="/dev/spidev0.0", SPISpeed=1, open=open):
> + def __init__(self, num, c_order=ChannelOrder.RGB,
interface=SPIInterface.PY_SPI,
> + dev="/dev/spidev0.0", SPISpeed=1, open=open, exists=exists):
>
> I just discovered this: https://github.com/jmcgeheeiv/pyfakefs- a fake
> filesystem for unit tests!
> ------------------------------
>
> In bibliopixel/drivers/spi_driver_base.py
> <https://github.com/ManiacalLabs/BiblioPixel/pull/
84#pullrequestreview-14364647>
> :
>
> >
> def _bootstrapSPIDev(self):
> - import os.path
> - import sys
> - if self.use_py_spi:
> + if self.interface != SPIInterface.FILE:
> + self.numSPI, self.numCS = -1, -1
> + d = self.dev.replace("/dev/spidev", "")
> + s = d.split('.')
> + if len(s) == 2:
> + self.numSPI = int(s[0])
> + self.numCS = int(s[1])
>
> If s doesn't length 2, you fail, silently!
>
> I'd go with self.numSPI, self.numCS = (int(i) for i in s) which throws an
> exception
> ------------------------------
>
> In test/driver_test.py
> <https://github.com/ManiacalLabs/BiblioPixel/pull/
84#pullrequestreview-14364647>
> :
>
> > @@ -69,8 +74,8 @@ def test_gamma1(self):
>
> def test_apa102(self):
> driver = DriverAPA102(num=4, **self.SPD)
> - expected = [0, 0, 0, 0, 255, 0, 0, 0, 255, 1, 8, 64,
> - 255, 2, 16, 128, 255, 3, 24, 192, 255, 0, 0, 0]
> + expected = [0, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 8, 255,
>
> Whoa, why the huge change here? what happened?
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/ManiacalLabs/BiblioPixel/pull/
84#pullrequestreview-14364647>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AA6a6nKFYSGT_UTcx7bp_
efEkcnZhB8-ks5rLoyZgaJpZM4LVRUG>
> .
>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#84 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAPdsunKwT1zWK5khvvWOmmYXmoIERr0ks5rLpBzgaJpZM4LVRUG>
.
--
/t
http://radio.swirly.com - art music radio 24/7 366/1000
|
F*&$ it... I'm throwing this all out. I've decided that this could all be done much cleaner. |
I approve!!
…On 28 December 2016 at 17:56, Dread ***@***.***> wrote:
F*&$ it... I'm throwing this all out. I've decided that this could all be
done much cleaner.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#84 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAPdsr1I8Pp8YlJELExTIJl16SyCRSQsks5rMpSxgaJpZM4LVRUG>
.
--
/t
http://radio.swirly.com - art music radio 24/7 366/1000
|
No description provided.