2018-07-23 08:25:23 +02:00
|
|
|
#ifdef HAS_BUTTON
|
|
|
|
|
|
|
|
#include "globals.h"
|
2018-10-04 22:08:54 +02:00
|
|
|
#include "button.h"
|
2018-07-23 08:25:23 +02:00
|
|
|
|
|
|
|
// Local logging tag
|
2019-02-27 00:49:32 +01:00
|
|
|
static const char TAG[] = __FILE__;
|
2018-07-23 08:25:23 +02:00
|
|
|
|
|
|
|
void readButton() {
|
2019-04-01 18:01:52 +02:00
|
|
|
ESP_LOGI(TAG, "Button pressed");
|
|
|
|
#ifdef HAS_DISPLAY
|
|
|
|
refreshtheDisplay(true); // switch to next display page
|
|
|
|
#else
|
|
|
|
payload.reset();
|
|
|
|
payload.addButton(0x01);
|
|
|
|
SendPayload(BUTTONPORT, prio_normal);
|
|
|
|
#endif
|
2018-07-23 08:25:23 +02:00
|
|
|
}
|
|
|
|
#endif
|