partofthething / infopanel

Show live data, animations, pictures, or anything on simple displays like RGB matrices
https://partofthething.com/infopanel/
GNU General Public License v3.0
31 stars 12 forks source link

Can't get my head around dx #25

Open TonAtLacework opened 2 years ago

TonAtLacework commented 2 years ago

So dx seems to be simple:

So why is my text scrolling from left to right and back from right to left no matter what i set the parameter to?

  eventdescription:
      type: DynamicFancyText
      #label: 'Description '
      data_label: event_description
      label_color: red
      value_color: white
      font_name: 5x7.bdf
      dx: 1
      ticks_per_movement: 5
partofthething commented 2 years ago

Oof yeah sorry about that. There's an undocumented option that defaults to true that you have to add to turn off the 'flipping':

try adding can_flip: false

  eventdescription:
      type: DynamicFancyText
      #label: 'Description '
      data_label: event_description
      label_color: red
      value_color: white
      font_name: 5x7.bdf
      dx: 1
      ticks_per_movement: 5
      can_flip: false
TonAtLacework commented 2 years ago

Ah, i love undocumented features. Now the issue i am having is when i make dx 0 or when i comment it out, i don't get my eventdescription sprite. Setting it to -1 provides the behavior i am looking for. Bug?

partofthething commented 2 years ago

Yeah I need to do a doc update for sure.

dx is supposed to mean "change in x per tick" so 0 would mean motionless (you'd have to set x and y to something more than 0 sometimes to see the sprite. -1 means it moves but in the opposite direction.

TonAtLacework commented 2 years ago

Hi Nick!

Fully understood. I thought that dx was indicating direction of motion and not "change in x per tick". Maybe I got thrown off-guard by the default value of 0 which, as I understand now, means no motion at all. Have you considered changing the default value to 1 so the sprite at least moves when dx and dy are used?

Ton.

On Sat, Oct 16, 2021, 07:14 Nick Touran @.***> wrote:

Yeah I need to do a doc update for sure.

dx is supposed to mean "change in x per tick" so 0 would mean motionless (you'd have to set x and y to something more than 0 sometimes to see the sprite. -1 means it moves but in the opposite direction.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/partofthething/infopanel/issues/25#issuecomment-944858780, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUKL4QVL4SINVURRJNJTHKLUHEC5DANCNFSM5GBIEV2A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.