XXX (HaaTa): It's not recommended to use this capability, use AnimationIndex instead
| 331 | |
| 332 | // XXX (HaaTa): It's not recommended to use this capability, use AnimationIndex instead |
| 333 | void Pixel_Animation_capability( TriggerMacro *trigger, uint8_t state, uint8_t stateType, uint8_t *args ) |
| 334 | { |
| 335 | CapabilityState cstate = KLL_CapabilityState( state, stateType ); |
| 336 | |
| 337 | switch ( cstate ) |
| 338 | { |
| 339 | case CapabilityState_Initial: |
| 340 | // Only use capability on press |
| 341 | break; |
| 342 | case CapabilityState_Debug: |
| 343 | // Display capability name |
| 344 | print("Pixel_Animation_capability(index,loops,pfunc,framedelay,frameoption,replace)"); |
| 345 | return; |
| 346 | default: |
| 347 | return; |
| 348 | } |
| 349 | |
| 350 | AnimationStackElement element; |
| 351 | element.trigger = trigger; |
| 352 | element.pos = 0; // TODO (HaaTa) Start at specific frame |
| 353 | element.subpos = 0; |
| 354 | element.index = *(uint16_t*)(&args[0]); |
| 355 | element.loops = *(uint8_t*)(&args[2]); |
| 356 | element.pfunc = *(uint8_t*)(&args[3]); |
| 357 | element.framedelay = *(uint8_t*)(&args[4]); |
| 358 | element.frameoption = *(uint8_t*)(&args[5]); |
| 359 | element.replace = *(uint8_t*)(&args[6]); |
| 360 | |
| 361 | Pixel_addAnimation( &element, cstate ); |
| 362 | } |
| 363 | |
| 364 | // XXX (HaaTa): TODO |
| 365 | void Pixel_Pixel_capability( TriggerMacro *trigger, uint8_t state, uint8_t stateType, uint8_t *args ) |
nothing calls this directly
no test coverage detected
searching dependent graphs…