清单6和7展示了主程序逻辑的其余部分以及shakecheck子例程,它将捕捉动作并切换模式。
Listings 6 and 7 show the remainder of the main program logic and the shakeCheck subroutine that perform the gesture acquisition and mode change.
子例程就绪后,主程序逻辑将允许用户创建音调序列,或以守护进程模式运行来侦听音调命令和执行命令。
With the subroutines in place, the main program logic will allow the user to create a tone sequence, or will run in daemon mode to listen for tones and execute commands.
应用推荐