libkiibohd callback function
( command, args )
| 654 | |
| 655 | |
| 656 | def callback( command, args ): |
| 657 | ''' |
| 658 | libkiibohd callback function |
| 659 | ''' |
| 660 | if control.debug: |
| 661 | logger.debug("Callback: {} {}", command, args) |
| 662 | |
| 663 | # Lookup function in callback dictionary |
| 664 | # Every function must taken a single argument |
| 665 | # Must convert byte string to utf-8 first |
| 666 | ret = control.callback_dict[ command.decode('utf-8') ]( args ) |
| 667 | |
| 668 | # Refresh callback interface |
| 669 | refresh_callback() |
| 670 | |
| 671 | # If returning None (default), change out to 1, C default |
| 672 | return ret is None and 1 or ret |
| 673 | |
| 674 | |
| 675 |
searching dependent graphs…