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

Method setMaxValue

Sming/Libraries/Servo/ServoChannel.cpp:12–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10#include <muldiv.h>
11
12bool ServoChannel::setMaxValue(uint32_t maxValue)
13{
14 if(maxValue < minValue || maxValue > Servo::maxChannelTime) {
15 return false;
16 }
17
18 this->maxValue = maxValue;
19
20 if(value > maxValue) {
21 value = maxValue;
22 servo.updateChannel(this);
23 }
24
25 return true;
26}
27
28bool ServoChannel::setMinValue(uint32_t minValue)
29{

Callers

nothing calls this directly

Calls 1

updateChannelMethod · 0.80

Tested by

no test coverage detected