-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
Hello,
I'm a bit confuse,
about this function
void Pwm::wr_ch_pair(int ch, uint32_t frequency, uint8_t bits) {
mem[ch].frequency = frequency;
mem[ch].resolution = bits;
if (ch % 2 == 0) { // even ch
mem[ch + 1].frequency = frequency;
mem[ch + 1].resolution = bits;
} else { // odd ch
mem[ch - 1].frequency = frequency;
mem[ch - 1].resolution = bits;
}
}
I cannot see the purpose of using 2 mem channels to store info about only one servo motor,
and why don't you mark this channel +1 or -1 as used ?
It's blocking me to use properly servo and pwm at the same time
Metadata
Metadata
Assignees
Labels
No labels