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

ThrottleHold

PreviousBrakeMagicNextHandbrake

Last updated 1 year ago

ThrottleHold utilized a input to control the cars throttle. ThrottleHold can be turned on/off to hold the throttle at a certain %. The purpose:

  • Give your foot a brake on long straights or in oval racing where 100% throttle application is held for most of the race.

  • Set to just under 100% it can help you get a steady and reproducable fuel save on long straights.

ThrottleHold is set up as a button+encoder complex. The encoder will adjust the throttle hold value when throttle hold is active. When throttle hold is inactive the encoder will work as a regular encoder with two button numbers for pulses on CW and CCW rotation. Whenis active, it will change that value instead.

This feature was designed for the SW1 steering wheel, so the functions so far only supports a few encoder categories. Others can be added on request.

throttleHoldT()

Use a toggle switch to turn throttleHold on/off. Paired with an encoder of thecategory. Button will not produce any button number. Encoder will need two button numbers which are active when neither brake magic or throttle hold is activated.

The amount of throttle application given can be read from the controllers throttle axis. Throttle hold on/off defaults to button field 6 for SimHub communication. It is returned as property [DahlDesign.DDCthrottleHoldActive].

Throttle hold % is defined by the variable throttleHoldValue found in 41_Presets.ino. It defaults to all presets with 1000, which is 100%.

The rotary encoder will adjust the throttle hold % when throttle hold is active.

throttleHoldT(int8_t buttonRow, int8_t buttonCol, int8_t rotaryRow, int8_t rotaryCol, bool reverse)

For a button on row 2 column 3 and encoder on row 3 column 2+3:

throttleHoldT(2, 3, 3, 2, true);

In this case, "reverse" is set to true, so the actions of CW and CCW rotation will be flipped.

  • Sim that supports secondary throttle input

  • 2 button numbers

throttleHoldM()

Use a momentary switch to toggle throttleHold on/off. Paired with an encoder of thecategory. Button will not produce any button number. Encoder will need two button numbers which are active when neither brake magic or throttle hold is activated.

The amount of throttle application given can be read from the controllers throttle axis. Throttle hold on/off defaults to button field 6 for SimHub communication. It is returned as property [DahlDesign.DDCthrottleHoldActive].

Throttle hold % is defined by the variable throttleHoldValue found in 41_Presets.ino. It defaults to all presets with 1000, which is 100%.

The rotary encoder will adjust the throttle hold % when throttle hold is active.

throttleHoldM(int8_t buttonRow, int8_t buttonCol, int8_t rotaryRow, int8_t rotaryCol, bool reverse)

For a button on row 2 column 3 and encoder on row 3 column 2+3:

throttleHoldM(2, 3, 3, 2, true);

In this case, "reverse" is set to true, so the actions of CW and CCW rotation will be flipped.

  • Sim that supports secondary throttle input

  • 2 button numbers

throttleHoldSW1()

Button will not produce any button number. Encoder will need two button numbers which are active when neither brake magic or throttle hold is activated.

The amount of throttle application given can be read from the controllers throttle axis. Throttle hold on/off defaults to button field 6 for SimHub communication. It is returned as property [DahlDesign.DDCthrottleHoldActive].

Throttle hold % is defined by the variable throttleHoldValue found in 41_Presets.ino. It defaults to all presets with 1000, which is 100%.

The rotary encoder will adjust the throttle hold % when throttle hold is active.

throttleHoldSW1(int8_t buttonRow, int8_t buttonCol, int8_t rotaryRow, int8_t rotaryColA, int8_t rotaryColB, bool reverse)

For a button on row 2 column 3 and encoder on row 3 column 2+3:

throttleHoldSW1(2, 3, 3, 2, 3, true);

In this case, "reverse" is set to true, so the actions of CW and CCW rotation will be flipped.

  • Sim that supports secondary throttle input

  • 2 button numbers

throttleHoldSimpleT()

Allows you to use a latching toggle/button to turn on/off throttle hold, that is all it does. To adjust the throttle hold value, use a encoder function such as PEC11Throttle, E18Throttle, funkyRotaryThrottle, etc.

Throttle hold % is defined by the variable throttleHoldValue found in 41_Presets.ino. It defaults to all presets with 1000, which is 100%.

throttleHoldSimpleT(int8_t buttonRow, int8_t buttonCol)

For a toggle on row 2 column 3:

throttleHoldSimpleT(2, 3);

  • An encoder to adjust the throttle hold level, at least if you want to be able to change it. Default is 100%

throttleHoldSimpleM()

Allows you to use a momentary toggle/button to turn on/off throttle hold, that is all it does. To adjust the throttle hold value, use a encoder function such as PEC11Throttle, E18Throttle, funkyRotaryThrottle, etc.

Throttle hold % is defined by the variable throttleHoldValue found in 41_Presets.ino. It defaults to all presets with 1000, which is 100%.

throttleHoldSimpleM(int8_t buttonRow, int8_t buttonCol)

For a button on row 2 column 3:

throttleHoldSimpleM(2, 3);

  • An encoder to adjust the throttle hold level, at least if you want to be able to change it. Default is 100%

Similar to throttleHoldT, but uses an encoder in the category. This is the function used in the SW1 steering wheel, which uses a rotary encoder with a latching switch included.

funkyRotary
secondary throttle
brake magic
rotary2Bit
rotary2Bit