Refactor dbus commands and internal data structures

This commit is contained in:
Luke
2020-06-29 15:52:49 +12:00
parent f85c8cbc50
commit 32e9e63809
26 changed files with 720 additions and 653 deletions

View File

@@ -1,32 +1,149 @@
fan_mode = 0
brightness = 1
current_mode = [93, 179, 0, 0]
[builtin_modes]
stable = [93, 179, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
breathe = [93, 179, 0, 1, 255, 0, 0, 235, 0, 0, 255, 0, 0, 0, 0, 0, 0]
strobe = [93, 179, 0, 2, 0, 0, 0, 235, 0, 0, 0, 0, 0, 0, 0, 0, 0]
rainbow = [93, 179, 0, 3, 0, 0, 0, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0]
star = [93, 179, 0, 4, 255, 255, 255, 225, 0, 255, 0, 0, 0, 0, 0, 0, 0]
rain = [93, 179, 0, 5, 0, 0, 0, 235, 0, 0, 0, 0, 0, 0, 0, 0, 0]
highlight = [93, 179, 0, 6, 255, 0, 0, 235, 0, 0, 0, 0, 0, 0, 0, 0, 0]
laser = [93, 179, 0, 7, 255, 0, 0, 235, 0, 0, 0, 0, 0, 0, 0, 0, 0]
ripple = [93, 179, 0, 8, 255, 0, 0, 235, 0, 0, 0, 0, 0, 0, 0, 0, 0]
pulse = [93, 179, 0, 10, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
comet = [93, 179, 0, 11, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
flash = [93, 179, 0, 12, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
multi_static = [[93, 179, 1, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [93, 179, 2, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [93, 179, 3, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [93, 179, 4, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]
[mode_performance.normal]
min_percentage = 0
max_percentage = 100
no_turbo = false
[mode_performance.boost]
min_percentage = 0
max_percentage = 100
no_turbo = false
[mode_performance.silent]
min_percentage = 0
max_percentage = 100
no_turbo = true
{
"fan_mode": 1,
"bat_charge_limit": 100,
"brightness": 1,
"current_mode": 0,
"builtin_modes": [
{
"Stable": {
"help": false,
"colour": [
255,
0,
0
]
}
},
{
"Breathe": {
"help": false,
"colour": [
255,
0,
0
],
"colour2": [
255,
0,
0
],
"speed": "Med"
}
},
{
"Strobe": {
"help": false,
"speed": "Med"
}
},
{
"Rainbow": {
"help": false,
"direction": "Up",
"speed": "Low"
}
},
{
"Star": {
"help": false,
"colour": [
255,
0,
0
],
"colour2": [
255,
0,
0
],
"speed": "Med"
}
},
{
"Rain": {
"help": false,
"speed": "Med"
}
},
{
"Highlight": {
"help": false,
"colour": [
255,
0,
0
],
"speed": "Med"
}
},
{
"Laser": {
"help": false,
"colour": [
255,
0,
0
],
"speed": "Med"
}
},
{
"Ripple": {
"help": false,
"colour": [
255,
0,
0
],
"speed": "Med"
}
},
{
"Pulse": {
"help": false,
"colour": [
255,
0,
0
]
}
},
{
"Comet": {
"help": false,
"colour": [
255,
0,
0
]
}
},
{
"Flash": {
"help": false,
"colour": [
255,
0,
0
]
}
}
],
"mode_performance": {
"normal": {
"min_percentage": 0,
"max_percentage": 100,
"no_turbo": false
},
"boost": {
"min_percentage": 0,
"max_percentage": 100,
"no_turbo": false
},
"silent": {
"min_percentage": 0,
"max_percentage": 80,
"no_turbo": false
}
}
}