Skip to content
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

Add support for 1.2" 4-Digit 7-Segment Displays #18

Merged
merged 10 commits into from
Jul 13, 2018

Conversation

caternuson
Copy link
Contributor

@caternuson caternuson commented Jul 13, 2018

Add support for 1.2" 4-Digit 7-Segment Displays for #17 .

These displays have some differences from the 0.56" 7-segment displays. There are no decimal places. There are two colons and an AM/PM indicator, which are controlled like this:

disp.ampm = True
disp.colon[0] = True
disp.color[1] = True

I'm not super keen on the class name BigSeg7x4 if someone has a better suggestion.

@caternuson caternuson requested a review from a team July 13, 2018 20:04
Copy link
Contributor

@kattni kattni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good! Thanks for adding this. Please update your pylint statements as suggested below.

if self._auto_write:
self.show()

#pylint: disable=W0212
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We prefer you use the spelled out version of the disables. Please update this to reflect the error in that format. For example: # pylint: disable=too-many-arguments.

def __getitem__(self, key):
if key > self._num_of_colons - 1:
raise ValueError("Trying to access a non-existent colon.")
return bool(self._disp._get_buffer(0x04) & self.MASKS[key])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest adding the # pylint: enable=your-lint-complaint wherever it needs to be in the event that something is eventually added to the end of this file. I'm not certain where it needs to go - it may need to encompass the entire class, or it may be able to go on line 205. Please experiment to find the best location for it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved it to inside the class. The disables apparently work at a code block level, so I think this should limit to with the class itself.

Copy link
Contributor

@kattni kattni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for updating! Looks good!

@kattni kattni merged commit 42f77f8 into adafruit:master Jul 13, 2018
@caternuson caternuson deleted the iss17 branch July 13, 2018 21:39
tannewt pushed a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Aug 7, 2018
Updating https://github.com/adafruit/Adafruit_CircuitPython_GPS to 3.1.0 from 3.0.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_GPS#7 from kattni/pypi
  > updated CoC
  > Merge pull request adafruit/Adafruit_CircuitPython_GPS#6 from margaret/issue_5
  > Merge pull request adafruit/Adafruit_CircuitPython_GPS#4 from sommersoft/new_docs

Updating https://github.com/adafruit/Adafruit_CircuitPython_HT16K33 to 2.1.0 from 2.0.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_HT16K33#19 from kattni/pypi
  > Merge pull request adafruit/Adafruit_CircuitPython_HT16K33#18 from caternuson/iss17
  > Merge pull request adafruit/Adafruit_CircuitPython_HT16K33#16 from caternuson/iss7
  > Merge pull request adafruit/Adafruit_CircuitPython_HT16K33#15 from caternuson/iss13b
  > Merge pull request adafruit/Adafruit_CircuitPython_HT16K33#14 from caternuson/iss13
  > Merge pull request adafruit/Adafruit_CircuitPython_HT16K33#12 from caternuson/iss3
  > Merge pull request adafruit/Adafruit_CircuitPython_HT16K33#11 from caternuson/iss3
  > Merge pull request adafruit/Adafruit_CircuitPython_HT16K33#10 from elmwoodelec/master
  > Merge pull request adafruit/Adafruit_CircuitPython_HT16K33#6 from sommersoft/new_docs

Updating https://github.com/adafruit/Adafruit_CircuitPython_IRRemote to 3.3.0 from 3.2.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_IRRemote#15 from kattni/pypi
  > Merge pull request adafruit/Adafruit_CircuitPython_IRRemote#14 from kattni/add-tx-example

Updating https://github.com/adafruit/Adafruit_CircuitPython_IS31FL3731 to 2.2.0 from 2.1.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_IS31FL3731#11 from kattni/pypi
  > updated CoC
  > Merge pull request adafruit/Adafruit_CircuitPython_IS31FL3731#10 from sommersoft/new_docs

Updating https://github.com/adafruit/Adafruit_CircuitPython_L3GD20 to 1.1.0 from 1.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_L3GD20#4 from kattni/pypi
  > updated CoC
  > Merge pull request adafruit/Adafruit_CircuitPython_L3GD20#3 from mrmcwethy/fixdocs

Updating https://github.com/adafruit/Adafruit_CircuitPython_LSM303 to 1.2.0 from 1.1.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_LSM303#5 from kattni/pypi
  > updated CoC
  > Merge pull request adafruit/Adafruit_CircuitPython_LSM303#4 from sommersoft/new_docs

Updating https://github.com/adafruit/Adafruit_CircuitPython_LSM9DS0 to 1.1.0 from 1.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_LSM9DS0#5 from kattni/pypi
  > updated CoC
  > Merge pull request adafruit/Adafruit_CircuitPython_LSM9DS0#3 from sommersoft/new_docs

Updating https://github.com/adafruit/Adafruit_CircuitPython_LSM9DS1 to 1.1.0 from 1.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_LSM9DS1#7 from kattni/pypi
  > updated CoC
  > Merge pull request adafruit/Adafruit_CircuitPython_LSM9DS1#5 from sommersoft/new_docs
  > Merge pull request adafruit/Adafruit_CircuitPython_LSM9DS1#3 from sommersoft/new_docs

Updating https://github.com/adafruit/Adafruit_CircuitPython_MatrixKe to 1.1.1 from 1.0.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_MatrixKe#2 from kattni/badge-fix
  > Merge pull request adafruit/Adafruit_CircuitPython_MatrixKe#1 from kattni/pypi
  > updated CoC

Updating https://github.com/adafruit/Adafruit_CircuitPython_MAX31855 to 3.0.3 from 3.0.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_MAX31855#7 from kattni/fixes

Updating https://github.com/adafruit/Adafruit_CircuitPython_MAX31865 to 2.1.0 from 2.0.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_MAX31865#6 from kattni/pypi
  > updated CoC

Updating https://github.com/adafruit/Adafruit_CircuitPython_MAX7219 to 1.1.0 from 1.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_MAX7219#13 from kattni/lint-fix
  > Merge pull request adafruit/Adafruit_CircuitPython_MAX7219#12 from kattni/pypi
  > updated CoC
  > Merge pull request adafruit/Adafruit_CircuitPython_MAX7219#11 from sommersoft/new_docs

Updating https://github.com/adafruit/Adafruit_CircuitPython_MAX9744 to 1.1.0 from 1.0.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_MAX9744#6 from kattni/pypi
  > updated CoC
  > Merge pull request adafruit/Adafruit_CircuitPython_MAX9744#5 from sommersoft/new_docs
  > Merge pull request adafruit/Adafruit_CircuitPython_MAX9744#4 from sommersoft/new_docs

Updating https://github.com/adafruit/Adafruit_CircuitPython_MCP2 to 1.1.0 from 1.0.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_MCP2#3 from kattni/pypi
  > updated CoC
  > attack of the typo
  > Get ready to PyPI
  > Merge pull request adafruit/Adafruit_CircuitPython_MCP2#2 from adafruit/deshipu-patch-1

Updating https://github.com/adafruit/Adafruit_CircuitPython_MCP4725 to 1.1.0 from 1.0.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_MCP4725#5 from kattni/pypi
  > updated CoC

Updating https://github.com/adafruit/Adafruit_CircuitPython_MCP9808 to 3.2.0 from 3.1.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_MCP9808#14 from kattni/pypi
  > updated CoC

Updating https://github.com/adafruit/Adafruit_CircuitPython_MMA8451 to 1.1.0 from 1.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_MMA8451#2 from kattni/pypi
  > updated CoC
  > Merge pull request adafruit/Adafruit_CircuitPython_MMA8451#1 from jepler/import-struct

Updating https://github.com/adafruit/Adafruit_CircuitPython_MPL3115A2 to 1.1.0 from 1.0.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_MPL3115A2#3 from kattni/pypi
  > updated CoC

Updating https://github.com/adafruit/Adafruit_CircuitPython_MPR121 to 1.1.0 from 1.0.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_MPR121#7 from kattni/pypi
  > updated CoC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants