pic32/libraries/SoftPWMServo/SoftPWMServo.cpp
/*
 * Set the pin to a new pulse width (value).
 * If value is less than MIN_PULSE_WIDTH, treat it as a angular measurement in degrees
 * and scale it between min and max (from 0 to 179 degrees).
 * Otherwise treat it as a microsecond value.
 */
Set the pin to a new pulse width (value).
If value is less than MIN_PULSE_WIDTH, treat it as a angular measurement in degrees
and scale it between min and max (from 0 to 179 degrees).
Otherwise treat it as a microsecond value.
Set the pin to a new pulse width ( value ) . If value is less than MIN_PULSE_WIDTH treat it as a angular measurement in degrees and scale it between min and max ( from 0 to 179 degrees ) . Otherwise treat it as a microsecond value .
void SoftServo::write(int value)
{
    if (value < MIN_PULSE_WIDTH)
    {
        if (value < 0) value = 0;
        if (value > 179) value = 179;
        value = map(value, 0, 179, this->min, this->max);
    }
    this->writeMicroseconds(value);
}
void SoftServo :: write ( int value ) { if ( value < MIN_PULSE_WIDTH ) { if ( value < 0 ) value = 0 ; if ( value > 179 ) value = 179 ; value = map ( value , 0 , 179 , this -> min , this -> max ) ; } this -> writeMicroseconds ( value ) ; }
Set the pin to a new pulse width (value).
Set the pin to a new pulse width ( value ) .
// treat values less than 544 as angles in degrees (valid values in microseconds are handled as microseconds)