Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool low_batt_a_ = false; // BC REVO BATT LEVELS
- bool low_batt_b_ = false; // BC REVO BATT LEVELS
- bool low_batt_c_ = false; // BC REVO BATT LEVELS
- bool low_batt_d_ = false; // BC REVO BATT LEVELS
- void Loop() override {
- CallMotion();
- if (on_pending_ && millis() - on_pending_base_ >= on_pending_delay_) {
- on_pending_ = false;
- SaberBase::TurnOn();
- }
- if (clash_pending1_) {
- clash_pending1_ = false;
- Clash(pending_clash_is_stab1_, pending_clash_strength1_);
- }
- if (clash_pending_ && millis() - last_clash_ >= clash_timeout_) {
- clash_pending_ = false;
- Clash2(pending_clash_is_stab_, pending_clash_strength_);
- }
- CheckLowBattery();
- #ifdef LOW_BATT_TIERED_WARNINGS
- if (battery_monitor.battery() < 3.25 && (!low_batt_a_)){
- ::CommandParser::DoParse("play", "lowbatt1.wav");
- low_batt_a_ = true;
- }
- if (battery_monitor.battery() < 3.20 && (!low_batt_b_)){
- ::CommandParser::DoParse("play", "lowbatt2.wav");
- low_batt_b_ = true;
- }
- if (battery_monitor.battery() < 3.15 && (!low_batt_c_)){
- ::CommandParser::DoParse("play", "lowbatt3.wav");
- low_batt_c_ = true;
- }
- if (battery_monitor.battery() < 3.10 && (!low_batt_d_)){
- ::CommandParser::DoParse("play", "lowbatt4.wav");
- low_batt_d_ = true;
- }
- #endif
- #ifdef ENABLE_AUDIO
- if (track_player_ && !track_player_->isPlaying()) {
- track_player_.Free();
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement