Skip to content

Commit

Permalink
DDI_Backlighting_fix
Browse files Browse the repository at this point in the history
updated the backlighting pin definition to 9 vs A9 as reported by Howling_Ape
  • Loading branch information
Arribe committed Oct 15, 2024
1 parent 26ff581 commit 2352293
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
* A10 | LDDI Contrast Encoder B
* 14 | LEWI Fire
* 16 | LEWI Master Caution
* A9 | DDI Backlighting PWM
* 9 | DDI Backlighting PWM, pin must be defined as digital #
* 6 | DDI IRQ
*
*
Expand Down Expand Up @@ -108,7 +108,7 @@
#define LDDI_CONT_B A10 ///< LDDI Contrast Encoder B
#define LEWI_FIRE_SW 14 ///< LEWI Fire
#define LEWI_MC_SW 16 ///< LEWI Master Caution
#define DDI_BACK_LIGHT A9 ///< DDI Backlighting PWM
#define DDI_BACK_LIGHT 9 ///< DDI Backlighting PWM, pin must be defined as digital #
#define DDI_IRQ 6 ///< DDI controller interrupt

/**
Expand Down Expand Up @@ -149,8 +149,6 @@ DcsBios::SwitchMultiPos leftDdiBrtSelect("LEFT_DDI_BRT_SELECT", leftDdiBrtSelect
/**
* @brief Setup DCS-BIOS control for DDI backlighting
*
* @bug Potential bug with backlighting, the lights are either full on when DCSBios reports the intensity >50% or full off <50%. May be an electrical / PCB issue.
*
*/
void onInstrIntLtChange(unsigned int newValue) {
analogWrite(DDI_BACK_LIGHT, map(newValue, 0, 65535, 0, 255));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
* A10 | RDDI Contrast Encoder B
* 14 | REWI Fire
* 16 | REWI Master Caution
* A9 | DDI Backlighting PWM
* 9 | DDI Backlighting PWM, pin must be defined as digital #
* 6 | DDI Interrupt Pin
*
*
* @brief following #define tells DCS-BIOS that this is a RS-485 slave device.
Expand Down Expand Up @@ -107,7 +108,7 @@
#define RDDI_CONT_B A10 ///< RDDI Contrast Encoder B
#define REWI_FIRE_SW 14 ///< REWI Fire
#define REWI_MC_SW 16 ///< REWI Master Caution
#define DDI_BACK_LIGHT A9 ///< DDI Backlighting PWM
#define DDI_BACK_LIGHT 9 ///< DDI Backlighting PWM, pin must be defined as digital #
#define DDI_IRQ 6 ///< DDI Interrupt Pin

/**
Expand Down Expand Up @@ -148,8 +149,6 @@ DcsBios::SwitchMultiPos rightDdiBrtSelect("RIGHT_DDI_BRT_SELECT", rightDdiBrtSel
/**
* @brief Setup DCS-BIOS control for DDI backlighting
*
* @bug Potential bug with backlighting, the lights are either full on when DCSBios reports the intensity >50% or full off <50%. May be an electrical / PCB issue.
*
*/
void onInstrIntLtChange(unsigned int newValue) {
analogWrite(DDI_BACK_LIGHT, map(newValue, 0, 65535, 0, 255));
Expand Down

0 comments on commit 2352293

Please sign in to comment.