Skip to content
This repository was archived by the owner on Apr 24, 2019. It is now read-only.

Commit 58a2e35

Browse files
InteractionProvider: move all variable initializations to constructor
1 parent cc782b4 commit 58a2e35

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

main.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,16 @@ MbedClient mbed_client(device);
7878
* for regular updates for the resources.
7979
*
8080
* MBED_CONF_APP_BUTTON1 is mapped to actual button pin the mbed_app.json file, where you need to
81-
* specify board-specific values or leave them undefined if the board does not have buttons.
81+
* specify board-specific value or leave it undefined if the board does not have buttons.
8282
*/
8383
class InteractionProvider {
8484

8585
public:
8686
InteractionProvider(Semaphore& updates_sem) : updates(updates_sem) {
8787

88+
timer_ticked = false;
89+
clicked = false;
90+
8891
// Set up handler function for the interaction button, if available
8992

9093
#ifdef MBED_CONF_APP_BUTTON1
@@ -97,8 +100,8 @@ class InteractionProvider {
97100
}
98101

99102
// flags for interaction, these are read from outside interrupt context
100-
volatile bool timer_ticked = false;
101-
volatile bool clicked = false;
103+
volatile bool timer_ticked;
104+
volatile bool clicked;
102105

103106

104107
private:

0 commit comments

Comments
 (0)