Use single LED to indicate download/upload#1
Open
ayufan wants to merge 1 commit into
Open
Conversation
|
thanks for this |
|
I like this! Thanks. 👍 |
Owner
|
I want to split out setting the LEDs from gathering the data. This way, people can customize what leds mean what. |
Owner
|
I've changed how this works in e88f248 This project now has an external config file, /etc/config/omnia-led-colors The example config file still uses the lan0/wan LEDs: config led wan
option colorfunction 'bandwidth'
option interface 'eth1'
option direction 'in'
option limit 300000000
config led lan0
option colorfunction 'bandwidth'
option interface 'eth1'
option direction 'out'
option limit 20000000But I've created a new colorfunction "dualbandwidth" along your lines. Upload above 50% sets the color to blue, below 50% the color is set by the download speed. This example sets the wan LED. config led wan
option colorfunction 'dualbandwidth'
option interface 'eth1'
option limit_in 300000000
option limit_out 20000000This way you can customize what colors are set and when. Using a uci config file means a LuCI module could be created to manage these settings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This uses single LED for presenting download and upload:
red: download saturated,green: download/upload OK,blue: upload saturated,magenta: download/upload saturated.