AP_Notify: Add missing const in member functions

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
This commit is contained in:
Patrick José Pereira 2021-02-01 13:26:32 -03:00 committed by Andrew Tridgell
parent 53eb2f2bf4
commit 3df3d002ff
4 changed files with 4 additions and 4 deletions

View File

@ -106,7 +106,7 @@ size_t MMLPlayer::next_dots()
return ret;
}
float MMLPlayer::rest_duration(uint32_t rest_length, uint8_t dots)
float MMLPlayer::rest_duration(uint32_t rest_length, uint8_t dots) const
{
float whole_note_period = 240.0f / _tempo;
if (rest_length == 0) {

View File

@ -37,7 +37,7 @@ private:
char next_char();
uint8_t next_number();
size_t next_dots();
float rest_duration(uint32_t rest_length, uint8_t dots);
float rest_duration(uint32_t rest_length, uint8_t dots) const;
// Called when the MML player should start the next action
void next_action();

View File

@ -701,7 +701,7 @@ void OreoLED_I2C::oreo_state::set_rgb(enum oreoled_pattern new_pattern, uint8_t
phase_offset = new_phase_offset;
}
bool OreoLED_I2C::oreo_state::operator==(const OreoLED_I2C::oreo_state &os)
bool OreoLED_I2C::oreo_state::operator==(const OreoLED_I2C::oreo_state &os) const
{
return ((os.mode==mode) && (os.pattern==pattern) && (os.macro==macro) && (os.red==red) && (os.green==green) && (os.blue==blue)
&& (os.amplitude_red==amplitude_red) && (os.amplitude_green==amplitude_green) && (os.amplitude_blue==amplitude_blue)

View File

@ -164,7 +164,7 @@ private:
uint8_t new_blue, uint8_t new_amplitude_red, uint8_t new_amplitude_green, uint8_t new_amplitude_blue,
uint16_t new_period, uint16_t new_phase_offset);
bool operator==(const oreo_state &os);
bool operator==(const oreo_state &os) const;
};
typedef struct {