mirror of https://github.com/rusefi/wideband.git
auxout: no need to invert PWM signal in software (#248)
Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
This commit is contained in:
parent
9534851a66
commit
025b687673
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue