MCPcopy Create free account
hub / github.com/kiibohd/controller / Pixel_saveConfig

Function Pixel_saveConfig

Macro/PixelMap/pixel.c:3625–3659  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3623}
3624
3625void Pixel_saveConfig() {
3626 // Animations
3627 for ( uint8_t pos = 0; pos < Pixel_AnimationStackSize; pos++ )
3628 {
3629 if (pos < Pixel_AnimationStack.size) {
3630 AnimationStackElement *elem = Pixel_AnimationStack.stack[pos];
3631 settings.animations[pos].index = elem->index;
3632
3633 // Save position, only if paused
3634 if ( ( elem->state & 0x7F ) == AnimationPlayState_Pause )
3635 {
3636 settings.animations[pos].pos = elem->pos - 1;
3637 }
3638 else
3639 {
3640 settings.animations[pos].pos = 0;
3641 }
3642 } else {
3643 settings.animations[pos].index = 255;
3644 settings.animations[pos].pos = 0;
3645 }
3646 }
3647
3648 // Fade periods
3649 for (uint8_t profile=0; profile<4; profile++)
3650 {
3651 for (uint8_t config=0; config<4; config++)
3652 {
3653 // XXX TODO: Needs a real lookup
3654 const PixelPeriodConfig period_config = Pixel_pixel_fade_profile_entries[profile].conf[config];
3655 settings.fade_periods[profile][config] = period_config;
3656 }
3657 settings.fade_brightness[profile] = Pixel_pixel_fade_profile_entries[profile].brightness;
3658 }
3659}
3660
3661void Pixel_printConfig() {
3662 // Animations

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…