363 {
364
366
368 for (int i = 0; i < led_column_table_length; ++i) {
371
372
374 const float inactive_lights_factor = 1.0f - active_lights_factor;
375 const float taper_point_1 = inactive_lights_factor / 2.0f;
376 const float taper_point_2 = taper_point_1 + active_lights_factor;
377
378 const int taper_idx_1 =
static_cast<int>(
fl::floor(taper_point_1 * led_column_table[i]));
379 const int taper_idx_2 =
static_cast<int>(
fl::floor(taper_point_2 * led_column_table[i]));
380
382
383 for (int i = 0; i < taper_idx_1 / 2; ++i) {
385 painted_lights++;
386 }
387
388 int length = taper_idx_2 - taper_idx_1;
391 painted_lights++;
392 }
393
394 length = led_column_table[i] - taper_idx_2;
395 for (
int i = 0; i <
length; ++i) {
397 painted_lights++;
398 }
399 skipped_lights +=
fl::max(0,
static_cast<int32_t>(led_column_table[i]) -
static_cast<int32_t>(painted_lights));
400 }
401
402 for (uint32_t i = 0; i < skipped_lights; ++i) {
404 }
405
407}
LedRopeTCL led_rope(kNumKeys)
void RawDrawPixel(const Color3i &c)
fl::UISlider length("Length", 1.0f, 0.0f, 1.0f, 0.01f)
FL_DISABLE_WARNING_PUSH U constexpr common_type_t< T, U > min(T a, U b) FL_NOEXCEPT
constexpr common_type_t< T, U > max(T a, U b) FL_NOEXCEPT
constexpr enable_if< is_fixed_point< T >::value, T >::type sqrt(T x) FL_NOEXCEPT
constexpr enable_if< is_fixed_point< T >::value, T >::type floor(T x) FL_NOEXCEPT