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

Method setPercentage

libraries/AD520X/AD520X.cpp:133–137  ·  view source on GitHub ↗

//////////////////////////////////////////////////////////////////////// SET PERCENTAGE

Source from the content-addressed store, hash-verified

131// SET PERCENTAGE
132//
133bool AD520X::setPercentage(uint8_t pm, float percentage)
134{
135 if ((percentage < 0) || (percentage > 100.0)) return false;
136 return setValue(pm, round(percentage * (255.0 / 100.0)));
137}
138
139
140float AD520X::getPercentage(uint8_t pm)

Callers 1

unittestFunction · 0.45

Calls

no outgoing calls

Tested by 1

unittestFunction · 0.36