98941a00fe
* feat: support progress, fan, pointer sensor types Initial implementation, not yet fully working. * only use one rendering layer per sensor type instead one per sensor Each layer uses > 1 MB and a panel can contain easily over 20 sensors! * support custom panels with --panels cli argument This includes one or more additional custom panels into the base configuration. Multiple --panels arguments are supported * update docs
2.2 KiB
2.2 KiB
Sensor Mode 2 Circular Progress
A circular progress sensor (known as fan in the AOOSTAR-X software) masks a progress bar image for a certain angular
range based on the corresponding sensor value. The masked image is alpha-blended with the panel image.
Sensor configuration fields:
mode: 2 (for fan)direction: 1 = clockwise, 2 = counter-clockwiselabel: label identifier, also used as sensor value data source identifierx,y: position on the panelwidth,height: size of the circular progress element (not yet used)pic: circular progress image to overlay. Should matchwidth,heightminAngle,maxAngle: range of the masked imageminValue,maxValue: clamp sensor value to this rangexz_x,xz_y
Example
The following configuration and graphics are taken from the 仪表盘_windows panel configuration in 有线网卡 windows驱动.rar.
Example panel.json with a single "fan" indicator sensor and the following (partial) background image in img:
{
"name": "Fan test panel",
"img": "background.jpg",
"sensor": [
{
"id": "29d9ef2d-30b4-459d-b2b0-43cb6d4d6b41",
"itemName": "CPU usage",
"mode": 2,
"type": 1,
"direction": 1,
"label": "cpu_percent",
"value": "47.7",
"x": 168,
"y": 184,
"width": 237,
"height": 237,
"fontColor": "#ffffff",
"fontSize": 14,
"fontFamily": "default_font",
"textAlign": "left",
"minAngle": -160,
"maxAngle": 30,
"minValue": 0,
"maxValue": 80,
"xz_x": 0,
"xz_y": 0,
"pic": "progress_circle.png"
}
]
}
Progress image "pic": "progress_circle.png":
The following graphic is rendered for progress example above:
Known Issues
Fan sensor rendering has been reverse engineered from the AOOSTAR-X app. Not all options are supported.
- Work in progress, not yet fully tested
direction: 2doesn't seem to workwidht,heightshould be considered and auto-resized as for mode 4
