MCPcopy Create free account
hub / github.com/SmingHub/Sming / setValue

Method setValue

Sming/Libraries/Servo/ServoChannel.cpp:44–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44uint32_t ServoChannel::setValue(uint32_t value)
45{
46 if(value < minValue) {
47 value = minValue;
48 } else if(value > maxValue) {
49 value = maxValue;
50 }
51 if(value != this->value) {
52 this->value = value;
53 servo.updateChannel(this);
54 }
55 return value;
56}
57
58bool ServoChannel::attach(uint8_t pin)
59{

Callers 2

sendReportMethod · 0.80
startServerMethod · 0.80

Calls 1

updateChannelMethod · 0.80

Tested by

no test coverage detected