|
|
using | FixedModes = modes::GroupFor< fixed::PaletteBlackBodyMode, fixed::PaletteRainbowMode, fixed::PalettePapiMode > |
| | Fixed modes groups.
|
| |
|
using | MiscFixedModes = modes::GroupFor< fixed::PalettePartyMode, fixed::PaletteForestMode, fixed::PaletteOceanMode > |
| | Fixed palette colors modes.
|
| |
| template<typename... Modes> |
| using | GroupFor = GroupTy< std::tuple< Modes... > > |
| | Group together many different modes::BasicMode.
|
| |
| template<typename ManagerConfig , typename... Groups> |
| using | ManagerForConfig = ModeManagerTy< ManagerConfig, std::tuple< Groups... >, 0 > |
| | Same as modes::ManagerFor but with custom defaults.
|
| |
| template<typename... Groups> |
| using | ManagerFor = ModeManagerTy< DefaultManagerConfig, std::tuple< Groups... >, 0 > |
| | Group together several mode groups defined through modes::GroupFor.
|
| |
| template<uint8_t hiddenGroupCnt, typename... Groups> |
| using | ManagerForHiddenGroups = ModeManagerTy< DefaultManagerConfig, std::tuple< Groups... >, hiddenGroupCnt > |
| | Group together several mode groups defined through modes::GroupFor. Will use the last hiddenGroupCnt as hidden groups, only accessible through certain action.
|
| |
| template<uint8_t hiddenGroupCnt, typename ManagerConfig , typename... Groups> |
| using | ManagerFoHiddenConfig = ModeManagerTy< ManagerConfig, std::tuple< Groups... >, hiddenGroupCnt > |
| | Same as modes::ManagerFor but with custom defaults, and additional hidden groups.
|
| |
|
using | LampTy = hardware::LampTy |
| | Define a particle in cylindrical space, and movement equations on the cylinder surface.
|
| |
|
| template<typename NewLocalMode > |
| static auto | context_as (auto &ctx) |
| | Bind provided context to another modes::BasicMode.
|
| |
| static constexpr uint16_t | to_strip (uint16_t, uint16_t) |
| | convert grid coordinates to strip index
|
| |
| static constexpr XYTy | strip_to_XY (uint16_t n) |
| | convert strip index to grid coordinates
|
| |
| static constexpr HelixXYZTy | strip_to_helix (int16_t n) |
| | convert strip index to 3D coordinates
|
| |
| static constexpr HelixXYZTy | strip_to_helix_unconstraint (const int16_t n) |
| | convert strip index to 3D coordinates, without checks on led index. This allows to use 3D coordinates out of the lamp body
|
| |
| static constexpr bool | is_led_index_valid (const int16_t ledIndex) |
| | True if the given strip index is a valid one.
|
| |
| static constexpr bool | is_lamp_coordinate_out_of_bounds (const float angle_rad, const float z) |
| | True if the given led index is out of bounds.
|
| |
| static constexpr uint16_t | to_led_index (const float angle_rad, const float z) |
| | convert a lamp coordinate to a led index
|
| |
| static constexpr int16_t | to_led_index_no_bounds (const float angle_rad, const float z) |
| | convert a lamp coordinate to a led index, the result can be an index out of the lamp body
|
| |
| static constexpr float | to_helix_z (const int16_t n) |
| | Convert a led index to an helix height coordinate.
|
| |
|
|
static constexpr float | cylinderRadius_m = LampTy::lampBodyRadius_mm / 1000.0 |
| | radius of the cylinder, in meters
|
| |
|
static constexpr float | angularSpeedGain = 50000 |
| | this gain compensate the angular acceleration for better display
|
| |
|
static constexpr float | linearSpeedGain = 1.0 |
| | gain for the linear speeds
|
| |
|
static constexpr float | reboundCoeff = 0.1 |
| | low rebound [0 - 1] on walls
|
| |
|
static constexpr float | speedDampening = 0.92 |
| | low speed dampening [0-0.99] at every steps (viscosity)
|
| |
|
static constexpr float | maxAngularSpeed_radS = 4 * c_TWO_PI |
| | max angular speed in radians/s
|
| |
|
static constexpr float | maxVerticalSpeed_mmS = 50 |
| | max vertical speed in mm/S
|
| |
Contains basic interface types to implement custom user modes.
Keys to enable modes to change configuration at runtime.
During modes::BasicMode::on_enter_mode() callback, modes can change configuration temporarily, for example to change how the ramp behaves, or how fast it goes.
To change a boolean value, use the following:
static void on_enter_mode(auto& ctx) {
ctx.template set_config_bool<ConfigKeys::rampSaturates>(true);
}
To change an integer value, 32-bit unsigned, use the following:
static void on_enter_mode(auto& ctx) {
ctx.template set_config_u32<ConfigKeys::customRampStepSpeedMs>(32);
}
All these values are reset to their default counterpart before each mode change, see modes::DefaultManagerConfig on how to override these defaults.
| Enumerator |
|---|
| rampSaturates | (bool) Mode saturates on custom ramp, or else wrap?
|
| clearStripOnModeChange | (bool) Mode clear strip after reset, or else do nothing?
|
| customRampStepSpeedMs | (u32) Mode time step for incrementing custom ramp (ms)
|
| customRampAnimEffect | (bool) Mode uses custom ramp anim. or not?
|
| customRampAnimChoice | (u32) Which custom ramp anim. to use (rainbow, etc)
|