Skip to content

Commit e509af5

Browse files
authored
Merge pull request #121 from IhorNehrutsa/Fix_deprecated_messages
Fix deprecated messages.
2 parents daf844f + bfb715c commit e509af5

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/OneButton.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -59,24 +59,24 @@ OneButton::OneButton(const int pin, const boolean activeLow, const bool pullupAc
5959

6060

6161
// explicitly set the number of millisec that have to pass by before a click is assumed stable.
62-
void OneButton::setDebounceTicks(const unsigned int ms)
62+
void OneButton::setDebounceMs(const unsigned int ms)
6363
{
6464
_debounce_ms = ms;
65-
} // setDebounceTicks
65+
} // setDebounceMs
6666

6767

6868
// explicitly set the number of millisec that have to pass by before a click is detected.
69-
void OneButton::setClickTicks(const unsigned int ms)
69+
void OneButton::setClickMs(const unsigned int ms)
7070
{
7171
_click_ms = ms;
72-
} // setClickTicks
72+
} // setClickMs
7373

7474

7575
// explicitly set the number of millisec that have to pass by before a long button press is detected.
76-
void OneButton::setPressTicks(const unsigned int ms)
76+
void OneButton::setPressMs(const unsigned int ms)
7777
{
7878
_press_ms = ms;
79-
} // setPressTicks
79+
} // setPressMs
8080

8181

8282
// save function for click event

src/OneButton.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -55,22 +55,22 @@ class OneButton
5555
* set # millisec after safe click is assumed.
5656
*/
5757
[[deprecated("Use setDebounceMs() instead.")]]
58-
void setDebounceTicks(const unsigned int ms); // deprecated
59-
void setDebounceMs(const unsigned int ms) { setDebounceTicks(ms); };
58+
void setDebounceTicks(const unsigned int ms) { setDebounceMs(ms); }; // deprecated
59+
void setDebounceMs(const unsigned int ms);
6060

6161
/**
6262
* set # millisec after single click is assumed.
6363
*/
6464
[[deprecated("Use setClickMs() instead.")]]
65-
void setClickTicks(const unsigned int ms); // deprecated
66-
void setClickMs(const unsigned int ms) { setClickTicks(ms); };
65+
void setClickTicks(const unsigned int ms) { setClickMs(ms); }; // deprecated
66+
void setClickMs(const unsigned int ms);
6767

6868
/**
6969
* set # millisec after press is assumed.
7070
*/
7171
[[deprecated("Use setPressMs() instead.")]]
72-
void setPressTicks(const unsigned int ms); // deprecated
73-
void setPressMs(const unsigned int ms) { setPressTicks(ms); };
72+
void setPressTicks(const unsigned int ms) { setPressMs(ms); }; // deprecated
73+
void setPressMs(const unsigned int ms);
7474

7575
// ----- Attach events functions -----
7676

0 commit comments

Comments
 (0)