auxout: no need to invert PWM signal in software (#248)

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
This commit is contained in:
rusefillc 2023-05-29 17:45:08 -04:00 committed by GitHub
parent 9534851a66
commit 025b687673
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 3 deletions

View File

@ -82,7 +82,6 @@ void SetAuxDac(int channel, float voltage)
{
voltage = voltage / AUXOUT_GAIN;
auto duty = voltage / VCC_VOLTS;
duty = 1.0 - duty;
duty = clampF(0, duty, 1);
auxDac.SetDuty(auxOutPwmCh[channel], duty);

View File

@ -55,7 +55,7 @@
// PB15 - TIM1_CH3N
#define AUXOUT_DAC_PWM_CHANNEL_1 2
// CH2N and CH3N are complementary outputs
#define AUXOUT_DAC_PWM_OUTPUT_MODE PWM_COMPLEMENTARY_OUTPUT_ACTIVE_HIGH
#define AUXOUT_DAC_PWM_OUTPUT_MODE PWM_COMPLEMENTARY_OUTPUT_ACTIVE_LOW
#define ID_SEL1_PORT GPIOC
#define ID_SEL1_PIN 13

View File

@ -47,7 +47,7 @@
// PB15 - TIM1_CH3N
#define AUXOUT_DAC_PWM_CHANNEL_1 2
// CH2N and CH3N are complementary outputs
#define AUXOUT_DAC_PWM_OUTPUT_MODE PWM_COMPLEMENTARY_OUTPUT_ACTIVE_HIGH
#define AUXOUT_DAC_PWM_OUTPUT_MODE PWM_COMPLEMENTARY_OUTPUT_ACTIVE_LOW
#define ID_SEL1_PORT GPIOC
#define ID_SEL1_PIN 13