Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- virtual void On() {
- if (IsOn()) return;
- if (current_style() && current_style()->NoOnOff())
- return;
- activated_ = millis();
- STDOUT.println("Ignition.");
- MountSDCard();
- EnableAmplifier();
- SaberBase::RequestMotion();
- // Avoid clashes a little bit while turning on.
- // It might be a "clicky" power button...
- IgnoreClash(1000); // BC was 300
- float preon_time = 0.0;
- #ifdef ANGLE_PREON
- if (fusor.angle1() > - M_PI / 4) {
- SaberBase::TurnOn();
- } else {
- SaberBase::DoPreOn(&preon_time);
- if (preon_time > 0.0) {
- on_pending_ = true;
- on_pending_base_ = millis();
- on_pending_delay_ = preon_time * 1000;
- } else {
- SaberBase::TurnOn();
- }
- }
- #else
- SaberBase::DoPreOn(&preon_time);
- if (preon_time > 0.0) {
- on_pending_ = true;
- on_pending_base_ = millis();
- on_pending_delay_ = preon_time * 1000;
- } else {
- SaberBase::TurnOn();
- }
- #endif // ANGLE_PREON
- }
Advertisement
Add Comment
Please, Sign In to add comment