Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • feedbackd feedbackd
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 23
    • Issues 23
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.

  • Librem5
  • feedbackdfeedbackd
  • Merge requests
  • !103

leds: Separate single color from multicolor leds

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Guido Gunther requested to merge guido.gunther/feedbackd:led-class into main Jan 21, 2023
  • Overview 2
  • Commits 11
  • Pipelines 4
  • Changes 9

Turn the FbdDevLed into a class and allow FbdDevMulticolor to derive form it. This avoids special cases for the later.

The order of things is as follows:

  • move FbdDevLed to a separate file
  • encapsulte FbdDevLed attributes until we can make the struct opaque
  • turn FbdDevLed into GObject
  • Make FbdDevLed a GInitable so initialization can fail without having all in fbd_dev_led_new () (thus making things harder for derived classes)
  • Add a minimal set of class methods with a default implementation (that still doesn't change the way things work)
  • Extract multicolor specific bits into a derived class thus making the default implementations simpler

I haven't yet tested the multicolor bits on a multicolor led system but single color still works as expected. I'll give this a second pass to cleanup some details but wanted to get this out so !100 can move forward.

Edited Feb 09, 2023 by Guido Gunther
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: led-class