mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_Notify: Add missing const in member functions
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
This commit is contained in:
parent
53eb2f2bf4
commit
3df3d002ff
@ -106,7 +106,7 @@ size_t MMLPlayer::next_dots()
|
|||||||
return ret;
|
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;
|
float whole_note_period = 240.0f / _tempo;
|
||||||
if (rest_length == 0) {
|
if (rest_length == 0) {
|
||||||
|
@ -37,7 +37,7 @@ private:
|
|||||||
char next_char();
|
char next_char();
|
||||||
uint8_t next_number();
|
uint8_t next_number();
|
||||||
size_t next_dots();
|
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
|
// Called when the MML player should start the next action
|
||||||
void next_action();
|
void next_action();
|
||||||
|
@ -701,7 +701,7 @@ void OreoLED_I2C::oreo_state::set_rgb(enum oreoled_pattern new_pattern, uint8_t
|
|||||||
phase_offset = new_phase_offset;
|
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)
|
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)
|
&& (os.amplitude_red==amplitude_red) && (os.amplitude_green==amplitude_green) && (os.amplitude_blue==amplitude_blue)
|
||||||
|
@ -164,7 +164,7 @@ private:
|
|||||||
uint8_t new_blue, uint8_t new_amplitude_red, uint8_t new_amplitude_green, uint8_t new_amplitude_blue,
|
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);
|
uint16_t new_period, uint16_t new_phase_offset);
|
||||||
|
|
||||||
bool operator==(const oreo_state &os);
|
bool operator==(const oreo_state &os) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user