Skip to content
This repository has been archived by the owner on Dec 23, 2021. It is now read-only.

CLUE unimplemented properties print correctly #324

Merged
merged 1 commit into from
Apr 13, 2020

Conversation

vandyliu
Copy link
Contributor

@vandyliu vandyliu commented Apr 13, 2020

AB#34577

Description:

  • Previously touch_0, touch_1, touch_2 and sound_level properties in CLUE used to throw an exception when a user tries to run these unimplemented functions
  • Now, they currently print the correct information
  • To test:
from adafruit_clue import clue
 
clue.sea_level_pressure = 1020
 
clue_data = clue.simple_text_display(title="CLUE Sensor Data!", title_scale=2)
clue.sound_level
while True:
    clue_data[0].text = "Touch 0: {}".format(clue.touch_0)
    clue_data[1].text = "Touch 1: {}".format(clue.touch_1)
    clue_data[2].text = "Touch 2: {}".format(clue.touch_2)
    clue_data.show()

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Limitations:

Please describe limitations of this PR

Testing:

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Checklist:

  • My code follows the style guidelines of this project
  • My code has been formatted with npm run format and passes the checks in npm run check
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

Copy link

@nasadigital nasadigital left a comment

Choose a reason for hiding this comment

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

Nice catch, I guess it's trickier when it's a property.
LGTM!

Copy link
Contributor

@xnkevinnguyen xnkevinnguyen left a comment

Choose a reason for hiding this comment

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

LGTM

@vandyliu vandyliu merged commit 52c3350 into dev Apr 13, 2020
@vandyliu vandyliu deleted the users/t-vali/clue-unimplemented-properties branch April 13, 2020 22:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants