this->button_state = true;
this->play_state = true;
- this->enable = this->kernel->config->value( pause_button_enable_checksum )->by_default(false)->as_bool();
- this->button.from_string( this->kernel->config->value( pause_button_pin_checksum )->by_default("2.12")->as_string())->as_input();
+ this->enable = THEKERNEL->config->value( pause_button_enable_checksum )->by_default(false)->as_bool();
+ this->button.from_string( THEKERNEL->config->value( pause_button_pin_checksum )->by_default("2.12")->as_string())->as_input();
- this->kernel->slow_ticker->attach( 100, this, &PauseButton::button_tick );
+ THEKERNEL->slow_ticker->attach( 100, this, &PauseButton::button_tick );
}
//TODO: Make this use InterruptIn
if( this->button_state ){
if( this->play_state ){
this->play_state = false;
- this->kernel->pauser->take();
+ THEKERNEL->pauser->take();
}else{
this->play_state = true;
- this->kernel->pauser->release();
+ THEKERNEL->pauser->release();
}
}
}