Skip to content

Meter.cpp re-initialisation fails to draw needle #19

Description

@nottledim

If you re-initialise (1) the meter using MeterWidget::analogMeter method then it doesn't draw the needle - expected to be at zero (2). The reason is the value old_analog is only set in the constructor after which it gets updated to the value of the needle. If that's zero the needle draw function is skipped as there is no change in needle value.
The solution is to initialise old_analog to -999 in the analogMeter method.

  1. it's quite cool; you can place a number of meters on the same display location and step through them with buttons or gestures.
  2. I think there's a case for an initial needle value for the analogMeter method.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions