1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-08-30 17:49:56 +02:00

Fixed some virtual / override problems

In some cases, virtual and override were used simultaneously
In other cases, destructors were virtual in non-base classes.
This commit is contained in:
Mitch Bradley
2021-06-27 12:55:59 -10:00
parent e2599de958
commit ebd021ceac
9 changed files with 16 additions and 16 deletions

View File

@@ -55,7 +55,7 @@ namespace Spindles {
// Name of the configurable. Must match the name registered in the cpp file.
const char* name() const override { return "10V"; }
virtual ~_10v() {}
~_10v() {}
protected:
void set_enable(bool enable_pin);

View File

@@ -63,7 +63,7 @@ namespace Spindles {
void init() override;
void config_message() override;
virtual void set_output(uint32_t duty) override;
void set_output(uint32_t duty) override;
// Configuration handlers:
void validate() const override { PWM::validate(); }
@@ -80,6 +80,6 @@ namespace Spindles {
// Name of the configurable. Must match the name registered in the cpp file.
const char* name() const override { return "BESC"; }
virtual ~BESC() {}
~BESC() {}
};
}

View File

@@ -49,7 +49,7 @@ namespace Spindles {
// Name of the configurable. Must match the name registered in the cpp file.
const char* name() const override { return "DAC"; }
virtual ~Dac() {}
~Dac() {}
private:
bool _gpio_ok; // DAC is on a valid pin

View File

@@ -52,6 +52,6 @@ namespace Spindles {
PWM::group(handler);
}
virtual ~Laser() {}
~Laser() {}
};
}

View File

@@ -47,6 +47,6 @@ namespace Spindles {
// Name of the configurable. Must match the name registered in the cpp file.
const char* name() const override { return "NoSpindle"; }
virtual ~Null() {}
~Null() {}
};
}

View File

@@ -36,9 +36,9 @@ namespace Spindles {
void init() override;
virtual void setSpeedfromISR(uint32_t dev_speed) override;
void setState(SpindleState state, SpindleSpeed speed) override;
void config_message() override;
void setSpeedfromISR(uint32_t dev_speed) override;
void setState(SpindleState state, SpindleSpeed speed) override;
void config_message() override;
// Methods introduced by this base clase
virtual void set_direction(bool Clockwise);

View File

@@ -40,10 +40,10 @@ namespace Spindles {
PWM& operator=(const PWM&) = delete;
PWM& operator=(PWM&&) = delete;
void init() override;
virtual void setSpeedfromISR(uint32_t dev_speed) override;
void setState(SpindleState state, SpindleSpeed speed) override;
void config_message() override;
void init() override;
void setSpeedfromISR(uint32_t dev_speed) override;
void setState(SpindleState state, SpindleSpeed speed) override;
void config_message() override;
// Configuration handlers:
void validate() const override { Spindle::validate(); }
@@ -67,7 +67,7 @@ namespace Spindles {
// Configurable
uint32_t _pwm_freq = 5000;
virtual void set_output(uint32_t duty) override;
void set_output(uint32_t duty) override;
virtual void deinit();
virtual void get_pins_and_settings();

View File

@@ -34,7 +34,7 @@ namespace Spindles {
Relay& operator=(const Relay&) = delete;
Relay& operator=(Relay&&) = delete;
virtual ~Relay() {}
~Relay() {}
// Configuration handlers:

View File

@@ -98,7 +98,7 @@ namespace Spindles {
// TODO: Validate spinup/spindown delay?
}
virtual void afterParse() override;
void afterParse() override;
void group(Configuration::HandlerBase& handler) override {
handler.item("spinup_ms", _spinup_ms);