@startuml
[*] --> S0

state "S0_Init" as S0
state "S1_Sample" as S1
state "S2_Offset" as S2
state "S3_Scale" as S3
state "S4_Convert" as S4
state "S5_Check" as S5
state "S6_Latch" as S6

S0 --> S1 : CALC_SM_COUNTER>5
S1 --> S2 : CALC_SM_COUNTER>5
S2 --> S3 : CALC_SM_COUNTER>5
S3 --> S4 : CALC_SM_COUNTER>20
S4 --> S5 : CALC_SM_COUNTER>20
S5 --> S6 : CALC_SM_COUNTER>5
S6 --> S0 : CALC_SM_COUNTER>5
@enduml
