Lamp-Da 0.1
A compact lantern project
Loading...
Searching...
No Matches
Static Public Attributes | List of all members
lampda::modes::DefaultManagerConfig Struct Reference

Default manager configuration, enables you to customize defaults. More...

#include <default_config.hpp>

Inheritance diagram for lampda::modes::DefaultManagerConfig:
MyCustomConfig

Static Public Attributes

static constexpr bool defaultRampSaturates = false
 By default, will custom ramp saturates, or else wrap around?
 
static constexpr bool defaultClearStripOnModeChange = true
 By default, will strip be cleared between modes, or else do nothing?
 
static constexpr uint32_t defaultCustomRampStepSpeedMs = 16
 By default, how slow custom ramp changes value (milliseconds)
 
static constexpr bool defaultCustomRampAnimEffect = true
 By default, use custom ramp animation, or else do nothing?
 
static constexpr uint32_t defaultCustomRampAnimChoice = 0
 By default, which custom ramp animation to use?
 
static constexpr uint32_t scrollRampStepSpeedMs = 850
 (misc) Override how slow mode & group scroll goes (milliseconds)
 
static constexpr uint32_t rampStartPeriodMs = 128
 (misc) Override ramp wait time before starting (milliseconds)
 
static constexpr uint8_t initialActiveIndex [4] = {0, 0, 0, 0}
 (misc) Override default initial active group or mode (by index)
 
static constexpr uint8_t defaultFavorite [4] = {0, 0, 0, 0}
 (misc) Override default initial active favorite mode (by index)
 

Detailed Description

Default manager configuration, enables you to customize defaults.

Implement a custom manager type a sfollow:

// default value for clearStripOnModeChange is overridden to True
static constexpr bool defaultClearStripOnModeChange = true;
};
Definition: my_custom_config.hpp:7
Default manager configuration, enables you to customize defaults.
Definition: default_config.hpp:42

Then use, instead of the modes::ManagerFor helper, the following:

// using ManagerTy = modes::ManagerFor<
mode1,
mode2>,
modeA,
// ... other modes
modeC>
>;
ModeManagerTy< ManagerConfig, std::tuple< Groups... >, 0 > ManagerForConfig
Same as modes::ManagerFor but with custom defaults.
Definition: manager_type.hpp:1149
GroupTy< std::tuple< Modes... > > GroupFor
Group together many different modes::BasicMode.
Definition: group_type.hpp:335

See configuration template below where you will need to uncomment the values you want to override:

#ifndef MY_CUSTOM_CONFIG_H
#define MY_CUSTOM_CONFIG_H
// uncomment only what you need to override
//
{
// static constexpr bool defaultRampSaturates = true;
// static constexpr bool defaultClearStripOnModeChange = false;
// static constexpr uint32_t defaultCustomRampStepSpeedMs = 32;
// static constexpr bool defaultCustomRampAnimEffect = true;
// static constexpr uint32_t defaultCustomRampAnimChoice = 0;
};
template<typename... Groups> using CustomManagerFor = lampda::modes::ManagerForConfig<MyCustomConfig, Groups...>;
#endif

See also modes::ConfigKeys for runtime configuration.


The documentation for this struct was generated from the following file: