~aleteoryx/muditaos

ref: 0e8b4c848e3f87f3bbb1f64ef7460cf56017b87f muditaos/module-services/service-evtmgr/doc/light_control_algorithm.svg -rw-r--r-- 9.4 KiB
0e8b4c84 — Lefucjusz [BH-2108] Fix misaligned charging symbol 3 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="385px" preserveAspectRatio="none" style="width:1097px;height:385px;background:#F0F0F0;" version="1.1" viewBox="0 0 1097 385" width="1097px" zoomAndPan="magnify"><defs><filter height="300%" id="f1um7bl6j87xa" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><rect fill="#ADD8E6" height="363.0547" style="stroke: #A80036; stroke-width: 1.0;" width="443" x="193.5" y="4"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="49" x="390.5" y="16.0669">500ms</text><rect fill="#90EE90" height="363.0547" style="stroke: #A80036; stroke-width: 1.0;" width="448" x="638.5" y="4"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="40" x="842.5" y="16.0669">25ms</text><rect fill="#F0F0F0" filter="url(#f1um7bl6j87xa)" height="59.2656" style="stroke: #000000; stroke-width: 2.0;" width="164.5" x="113.5" y="296.7891"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="60" x2="60" y1="74.7266" y2="373.0547"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="151.5" x2="151.5" y1="74.7266" y2="373.0547"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="272.5" x2="272.5" y1="74.7266" y2="373.0547"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="436.5" x2="436.5" y1="74.7266" y2="373.0547"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="578.5" x2="578.5" y1="74.7266" y2="373.0547"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="741.5" x2="741.5" y1="74.7266" y2="373.0547"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="966.5" x2="966.5" y1="74.7266" y2="373.0547"/><rect fill="#FEFECE" filter="url(#f1um7bl6j87xa)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="100" x="8" y="39.4297"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="86" x="15" y="59.4248">Key pressed</text><rect fill="#FEFECE" filter="url(#f1um7bl6j87xa)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="53" x="123.5" y="39.4297"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="39" x="130.5" y="59.4248">Timer</text><rect fill="#FEFECE" filter="url(#f1um7bl6j87xa)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="147" x="197.5" y="39.4297"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="133" x="204.5" y="59.4248">Light Measurement</text><rect fill="#FEFECE" filter="url(#f1um7bl6j87xa)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="153" x="358.5" y="39.4297"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="139" x="365.5" y="59.4248">Brightness Function</text><rect fill="#FEFECE" filter="url(#f1um7bl6j87xa)" height="46.5938" style="stroke: #A80036; stroke-width: 1.5;" width="103" x="525.5" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="85" x="532.5" y="43.1279">Ramp target</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="89" x="532.5" y="59.4248">value update</text><rect fill="#FEFECE" filter="url(#f1um7bl6j87xa)" height="46.5938" style="stroke: #A80036; stroke-width: 1.5;" width="194" x="642.5" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="131" x="672" y="43.1279">Current ramp value</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="180" x="649.5" y="59.4248">calculation with hysteresis</text><rect fill="#FEFECE" filter="url(#f1um7bl6j87xa)" height="46.5938" style="stroke: #A80036; stroke-width: 1.5;" width="228" x="850.5" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="148" x="888.5" y="43.1279">Light driver duty cycle</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="214" x="857.5" y="59.4248">update with Gamma Correction</text><polygon fill="#A80036" points="261,101.8594,271,105.8594,261,109.8594,265,105.8594" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="60" x2="267" y1="105.8594" y2="105.8594"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="107" x="67" y="100.7935">turn on backlight</text><polygon fill="#A80036" points="425,130.9922,435,134.9922,425,138.9922,429,134.9922" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="273" x2="431" y1="134.9922" y2="134.9922"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="91" x="280" y="129.9263">measurement</text><polygon fill="#A80036" points="567,175.2578,577,179.2578,567,183.2578,571,179.2578" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="437" x2="573" y1="179.2578" y2="179.2578"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="67" x="444" y="159.0591">brightness</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="34" x="444" y="174.1919">value</text><polygon fill="#A80036" points="729.5,204.3906,739.5,208.3906,729.5,212.3906,733.5,208.3906" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="579" x2="735.5" y1="208.3906" y2="208.3906"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="77" x="586" y="203.3247">ramp target</text><polygon fill="#A80036" points="954.5,248.6563,964.5,252.6563,954.5,256.6563,958.5,252.6563" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="741.5" x2="960.5" y1="252.6563" y2="252.6563"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="84" x="748.5" y="232.4575">current ramp</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="34" x="748.5" y="247.5903">value</text><polygon fill="#A80036" points="140,277.7891,150,281.7891,140,285.7891,144,281.7891" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="60" x2="146" y1="281.7891" y2="281.7891"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="68" x="67" y="276.7231">start timer</text><path d="M113.5,296.7891 L177.5,296.7891 L177.5,303.7891 L167.5,313.7891 L113.5,313.7891 L113.5,296.7891 " fill="#EEEEEE" style="stroke: #000000; stroke-width: 1.0;"/><rect fill="none" height="59.2656" style="stroke: #000000; stroke-width: 2.0;" width="164.5" x="113.5" y="296.7891"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="19" x="128.5" y="309.856">alt</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="59" x="192.5" y="308.9995">[timeout]</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="152" x2="194" y1="335.0547" y2="335.0547"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="194" x2="194" y1="335.0547" y2="348.0547"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="153" x2="194" y1="348.0547" y2="348.0547"/><polygon fill="#A80036" points="163,344.0547,153,348.0547,163,352.0547,159,348.0547" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="107" x="159" y="329.9888">turn off backlight</text><!--MD5=[9cfc277bd45cb258eabdfe3eced7503c]
@startuml
skinparam BackgroundColor F0F0F0

hide footbox

participant "Key pressed" as kp
participant "Timer" as t

box "500ms" #LightBlue
participant "Light Measurement" as lm
participant "Brightness Function" as bc
participant "Ramp target \nvalue update" as ru
end box

box "25ms" #LightGreen
participant "Current ramp value \ncalculation with hysteresis" as rc
participant "Light driver duty cycle \nupdate with Gamma Correction" as ld
end box

kp -> lm : turn on backlight
lm -> bc : measurement
bc -> ru : brightness \nvalue
ru -> rc : ramp target
rc -> ld : current ramp \nvalue
kp -> t  : start timer

alt timeout
t -> t : turn off backlight
end

@enduml

PlantUML version 1.2020.02(Sun Mar 01 05:22:07 EST 2020)
(GPL source distribution)
Java Runtime: OpenJDK Runtime Environment
JVM: OpenJDK 64-Bit Server VM
Java Version: 11.0.12+7-post-Debian-2
Operating System: Linux
Default Encoding: UTF-8
Language: en
Country: US
--></g></svg>