Skip to content

Commit

Permalink
fix samplig period not stored
Browse files Browse the repository at this point in the history
fixing issue that sampling period was not stored in the sampling object
  • Loading branch information
erik1392 committed Dec 13, 2023
1 parent 51be011 commit 71ab428
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/sampling/SamplingCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ void SamplingNoServo::SamplingClass::period(unsigned long microseconds) {
}
#elif ARDUINO_ARCH_STM32
sampling_timer->setOverflow((uint32_t)microseconds, MICROSEC_FORMAT);
setSamplingPeriod(microseconds);

#else
#error "Architecture not supported."
Expand Down Expand Up @@ -487,6 +488,7 @@ void SamplingServo::SamplingClass::period(unsigned long microseconds) {

#elif ARDUINO_ARCH_STM32
sampling_timer->setOverflow((uint32_t)microseconds, MICROSEC_FORMAT);
setSamplingPeriod(microseconds);

#else
#error "Architecture not supported."
Expand Down

0 comments on commit 71ab428

Please sign in to comment.