MCPcopy Create free account
hub / github.com/RobTillaart/Arduino / getPercentage

Method getPercentage

libraries/AD520X/AD520X.cpp:140–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138
139
140float AD520X::getPercentage(uint8_t pm)
141{
142 if (pm >= _pmCount) return 0;
143 uint8_t v = _value[pm];
144 if (v == 0) return 0.0;
145 return (100.0 / 255.0) * v;
146}
147
148
149// STEREO same percentage

Callers 1

unittestFunction · 0.45

Calls

no outgoing calls

Tested by 1

unittestFunction · 0.36