From 4c5b8c8c46750807c23ebcc7814c0e2856d43a0b Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Tue, 11 Nov 2014 11:39:31 -0500 Subject: [PATCH] Correct off-by-one error in DigOut PWM Gen B HAL code (fixes artf3705 for C++/Java) Change-Id: I4cd65089690463b69cfe815bd078d744fb21ff0f --- hal/lib/Athena/Digital.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hal/lib/Athena/Digital.cpp b/hal/lib/Athena/Digital.cpp index 0d3a714a58..5c3027d72b 100644 --- a/hal/lib/Athena/Digital.cpp +++ b/hal/lib/Athena/Digital.cpp @@ -242,7 +242,7 @@ void setPWMPeriodScale(void* digital_port_pointer, uint32_t squelchMask, int32_t /** * Allocate a DO PWM Generator. - * Allocate PWM generators so that they are not accidently reused. + * Allocate PWM generators so that they are not accidentally reused. * * @return PWM Generator refnum */ @@ -299,12 +299,12 @@ void setPWMDutyCycle(void* pwmGenerator, double dutyCycle, int32_t *status) { if(id < 4) digitalSystem->writePWMDutyCycleA(id, (uint8_t)rawDutyCycle, status); else - digitalSystem->writePWMDutyCycleB(id - 3, (uint8_t)rawDutyCycle, status); + digitalSystem->writePWMDutyCycleB(id - 4, (uint8_t)rawDutyCycle, status); } } /** - * Configure which DO channel the PWM siganl is output on + * Configure which DO channel the PWM signal is output on * * @param pwmGenerator The generator index reserved by AllocateDO_PWM() * @param channel The Digital Output channel to output on