II.3.3. Writing Button Event Handler

Button’s event handler should be written if any change of the button’s state/value should trigger some task. For example, if we have to indicate the change by LED indicator or to compute some intermediate parameter value. To write the handler, we have to define the handler function void onButtonChange(int buttonIndex) inside the effectModule descendant class. Here is the example code:

Now you can see in the codes that handler function definition has been added to the gainDoubler class at line #9 and the implementation has been added at line #43.

Back to Table of ContentsBuy BSCORE Dev Pedal PCBBuy BSCORE ModuleBuy BSCORE Dev Pedal