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

Conversation

@andreamah
Copy link
Contributor

@andreamah andreamah commented Apr 13, 2020

Description:

Fixed bugs:

  • group.py
  • adafruit_clue.py
    • Made adjustments to x and y coordinates of text placement to incorporate scale, as it does on the device.
  • adafruit_display_text package
    • Changed label.py within the tar.gz in order to update the screen when setters are called for the label fields.

Type of change

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

Testing:

Using different values of text_scale and title_scale in the following test (and comparing the image to the one on the actual CLUE):

from adafruit_clue import clue

clue.sea_level_pressure = 1020

clue_data = clue.simple_text_display(title="TITLE", text_scale=3, title_scale=3)

while True:
    clue_data[0].text = "Acceleration: {:.2f} {:.2f} {:.2f} m/s^2".format(
        *clue.acceleration
    )
    clue_data[1].text = "Gyro: {:.2f} {:.2f} {:.2f} dps".format(*clue.gyro)
    clue_data[2].text = "Magnetic: {:.3f} {:.3f} {:.3f} uTesla".format(*clue.magnetic)
    clue_data[3].text = "Pressure: {:.3f} hPa".format(clue.pressure)
    clue_data[4].text = "Altitude: {:.1f} m".format(clue.altitude)
    clue_data[5].text = "Temperature: {:.1f} C".format(clue.temperature)
    clue_data[6].text = "Humidity: {:.1f} %".format(clue.humidity)
    clue_data[7].text = "Proximity: {}".format(clue.proximity)
    clue_data[8].text = "Gesture: {}".format(clue.gesture)
    clue_data[9].text = "Color: R: {} G: {} B: {} C: {}".format(*clue.color)
    clue_data[10].text = "Button A: {}".format(clue.button_a)
    clue_data[11].text = "Button B: {}".format(clue.button_b)
    clue_data.show()

Also tested above test with invalid scales.

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! LGTM

@andreamah andreamah merged commit 824b141 into dev Apr 14, 2020
@andreamah andreamah deleted the users/t-anmah/clue-bug-fixes branch April 14, 2020 17:00
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.

4 participants