Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for configurable on/off values for binary led backend #32

Merged

Conversation

spiiroin
Copy link
Contributor

@spiiroin spiiroin commented Jul 3, 2019

No description provided.

Copy link

@jusa jusa left a comment

Choose a reason for hiding this comment

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

Some iterators use old cfg[i].key NULL instead of new CONFTYPE_NONE sentinel.

Dynamic strings are stored to structs with const char* types.

@spiiroin
Copy link
Contributor Author

spiiroin commented Jul 4, 2019

After thinking a while: For legacy static config stuff to go correctly, 'const char *' strings need to be used in structs - and config code then effectively needs to ignore the const part - lesser evil and so on. I'll try adding an explanatory comment somewhere...

Currently only file paths can be defined in led backend configuration
and the logic is ill suited for other types of data.

Add support for defining generic string values.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
@spiiroin spiiroin force-pushed the mer1813_override_binary_on_off_values branch from 47a9ebf to d362b80 Compare July 4, 2019 08:36
@spiiroin
Copy link
Contributor Author

spiiroin commented Jul 4, 2019

Review commits squashed

@spiiroin
Copy link
Contributor Author

spiiroin commented Jul 4, 2019

Tested originally on a device that requires dynamic config -> missed that static config does not work. Fixed now.

In some devices value that should be written to 'brightness' file when
turning the led on has nothing to do with the value that is readable
from 'max_brightness' file.

Make it possible to configure values to use instead of 0/max_brightness.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
@spiiroin spiiroin force-pushed the mer1813_override_binary_on_off_values branch from d3ccf0a to 8a289f2 Compare July 4, 2019 09:08
@spiiroin
Copy link
Contributor Author

spiiroin commented Jul 4, 2019

Review commits squashed

@spiiroin spiiroin merged commit 1662cd6 into mer-hybris:master Jul 4, 2019
@spiiroin spiiroin deleted the mer1813_override_binary_on_off_values branch August 8, 2019 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants