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

Function Pixel_SecondaryProcessing_setup

Macro/PixelMap/pixel.c:2274–2301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2272}
2273
2274void Pixel_SecondaryProcessing_setup()
2275{
2276 // Set default gamma setting
2277 gamma_enabled = Pixel_gamma_default_define;
2278
2279 // Disable all fade profiles (active defaults afterwards)
2280 memset( Pixel_pixel_fade_profile, 0, Pixel_TotalPixels_KLL );
2281
2282 // Setup each of the default profiles
2283 Pixel_SecondaryProcessing_profile_init();
2284
2285 // Setup default profile parameters
2286 for ( uint8_t pf = 0; pf < 4; pf++ )
2287 {
2288 // Each of the periods
2289 for ( uint8_t pr = 0; pr < 4; pr++ )
2290 {
2291 // Set period to profile
2292 PixelPeriodConfig conf = settings.fade_periods[pf][pr];
2293 Pixel_pixel_fade_profile_entries[pf].conf[pr] = conf;
2294 }
2295
2296 // Reset state
2297 Pixel_pixel_fade_profile_entries[pf].pos = 0;
2298 Pixel_pixel_fade_profile_entries[pf].period_conf = PixelPeriodIndex_Off_to_On;
2299 Pixel_pixel_fade_profile_entries[pf].brightness = settings.fade_brightness[pf];
2300 }
2301}
2302
2303// Given a starting value and profile, calculate the resulting brightness
2304// The returned value is always equal to or less than val

Callers 3

Pixel_processFunction · 0.85
Pixel_setupFunction · 0.85
Pixel_loadConfigFunction · 0.85

Calls 2

memsetFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…