25 lines
323 B
C++
25 lines
323 B
C++
|
#include "stairs.h"
|
||
|
#include "config.h"
|
||
|
|
||
|
void Stairs::init(PCA9685* pwmDriver)
|
||
|
{
|
||
|
this->pwmDriver = pwmDriver;
|
||
|
}
|
||
|
|
||
|
|
||
|
uint8_t Stairs::getCount()
|
||
|
{
|
||
|
return StepCount;
|
||
|
}
|
||
|
|
||
|
|
||
|
void Stairs::set(uint8_t step, uint16_t value)
|
||
|
{
|
||
|
pwmDriver->setPWM(step, value);
|
||
|
}
|
||
|
|
||
|
|
||
|
void Stairs::setAll(uint16_t value)
|
||
|
{
|
||
|
pwmDriver->setAll(value);
|
||
|
}
|