DDC
  • Welcome
    • Introduction
    • Supported hardware
  • 1: Project planning
    • Switch inputs
      • Switch table
      • Direct
      • Shift register
      • Port expander
    • Analog inputs
      • External ADC
    • RGB LED
    • Digital outputs
    • PWM / Circuit control
    • EEPROM
    • Processing and memory
  • 2. Wiring
    • Switch inputs
      • Matrix
      • Direct
      • Shift register
      • Port expander
    • Analog
      • Analog switches
      • External ADC
    • RGB LED
    • Digital outputs
    • PWM / Circuit control
    • EEPROM
  • 3. Coding
    • Essentials
      • 02_Board.ino
      • 08_Joystick
      • 10_TableAndAnalog.ino
        • Switch table
        • Analog channels
      • 30_Switches.ino
    • Peripherals
      • RGB LED
        • Firmware control
          • LED functions
          • Color
          • Brightness
          • Presets
        • SimHub control
      • Digital outputs
        • Setup
        • SimHub control
        • Firmware control
      • PWM / Circuit control
        • Setup
        • Calibrate
        • Switch control
        • Trigger control
      • Shift register
      • I2C devices
        • ADS1115
        • PCA9555
        • CAT24C512
    • Advanced
      • Analog inject
      • Conditional coding
        • Triggers
        • Editors
      • Field placement
      • Presets
        • 31_RunningPresets.ino
        • 32_Presets.ino
        • Example
    • Upload
    • Naming the controller
  • 4. Connect to SimHub
    • LED control
    • Controller settings and properties
      • How to connect?
      • How does it work?
      • How to control it?
      • Property list
  • Switch library
    • Pushbutton
    • Function switches
    • Toggle switches
    • Hat switches
    • Car control functions
      • QuickSwitch
      • BrakeMagic
      • ThrottleHold
      • Handbrake
    • Pedals & paddles
      • Brake/throttle
      • Clutch
      • Bite point & launch
      • Filtered curves
      • Shifter
    • Funky switch
      • Directional
      • Center push
    • Encoders
      • rotary2Bit
      • rotary4Bit
      • funkyRotary
      • wildEncoder
      • E18
      • rotaryPulse
      • PEC11
    • Rotary switches
      • rotaryAnalog
      • quickRotary
      • SW1
      • Editing functions
    • Multiswitch complexes
      • Hybrid rotary
      • Multifunction rotary
      • Modded encoder
      • Stacked encoder
    • Preset
    • DDS
    • RGB LED control
    • PWM / Circuit control
    • Utility
  • Fast DDC
    • Buttons and LED
    • 4 encoders, buttons and LED
    • Dual clutches, 4 encoders, buttons and LED
    • Dual clutches, 6 encoders, button matrix and LED
  • CB1
    • Ordering
      • Order together
      • Order yourself
        • 1. Open in EasyEDA
        • 2. Export files
        • 3. Edit Pick&Place
        • 4. Pin headers and jumper
        • 5. Order from JLCPCB
    • Wiring
    • Code
      • Essentials
      • Complete project
      • Settings
    • Circuit
    • Shields
      • Robin
  • Collaboration
Powered by GitBook
On this page
  1. Switch library
  2. Car control functions

BrakeMagic

PreviousQuickSwitchNextThrottleHold

Last updated 1 year ago

If you didn't know about it before, everyone got introduced to "brake magic" during the 2021 Azerbaijan Grand Prix where Lewis Hamilton accidentally left his on and locked his front wheels into T1 after standing start restart.

For Lewis, the brake magic is a toggle that does a number of changes to brakes, particularily useful for keeping the front tires and brakes warm during safety car. In DDC, the brake magic is a system that applies a given percent of brake application when on. The amount can be adjusted on the fly, and can be defined in your presets, or stored per preset if using EEPROM.

Brake magic requires the sim to support inputs.

brakeMagicT()

Use a toggle switch to turn brake magic on/off. Has 2 modes.

  • 0: Brake magic

  • 1: Pulsing toggle switch

The amount of brake application given can be read from the controllers brake axis. Brake magic on/off defaults to button field 7 for SimHub communication. It is returned as property [DahlDesign.DDCmagicActive].

Brake magic % is defined by the variable brakeMagicValue found in 41_Presets.ino. It defaults to all presets with 50, which is 5%.

Brake magic % can be adjusted on the fly with a switch.

void brakeMagicT(int row, int col)

For a switch on row 3 column 5 -> brakeMagicT(3,5);

  • Sim that supports secondary brake input

  • 1 button number

brakeMagicM()

Use a momentary button to turn brake magic on/off. Has 2 modes.

  • 0: Brake magic

  • 1: Regular momentry button

The amount of brake application given can be read from the controllers brake axis. Brake magic on/off defaults to button field 7 for SimHub communication. It is returned as property [DahlDesign.DDCmagicActive].

Brake magic % is defined by the variable brakeMagicValue found in 41_Presets.ino. It defaults to all presets with 50, which is 5%.

Brake magic % can be adjusted on the fly with a switch.

void brakeMagicM(int row, int col)

For a switch on row 3 column 5 -> brakeMagicM(3,5);

  • Sim that supports secondary brake input

  • 1 button number

secondary brake
ThrottleHold
ThrottleHold