mirror of
https://github.com/OpenEPaperLink/OpenEPaperLink.git
synced 2026-03-21 00:04:28 +01:00
Button 3 (#473)
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -6,6 +6,7 @@
|
||||
#define WAKEUP_REASON_NFC 3
|
||||
#define WAKEUP_REASON_BUTTON1 4
|
||||
#define WAKEUP_REASON_BUTTON2 5
|
||||
#define WAKEUP_REASON_BUTTON3 6
|
||||
#define WAKEUP_REASON_FAILED_OTA_FW 0xE0
|
||||
#define WAKEUP_REASON_FIRSTBOOT 0xFC
|
||||
#define WAKEUP_REASON_NETWORK_SCAN 0xFD
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
bool needRedraw(uint8_t contentMode, uint8_t wakeupReason) {
|
||||
// contentmode 26, timestamp
|
||||
if ((wakeupReason == WAKEUP_REASON_BUTTON1 || wakeupReason == WAKEUP_REASON_BUTTON2) && contentMode == 26) return true;
|
||||
if ((wakeupReason == WAKEUP_REASON_BUTTON1 || wakeupReason == WAKEUP_REASON_BUTTON2 || wakeupReason == WAKEUP_REASON_BUTTON3) && contentMode == 26) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2264,7 +2264,7 @@ int getJsonTemplateUrl(String &filename, String URL, time_t fetched, String MAC,
|
||||
http.addHeader("If-Modified-Since", formatHttpDate(fetched));
|
||||
http.addHeader("X-ESL-MAC", MAC);
|
||||
http.setFollowRedirects(HTTPC_STRICT_FOLLOW_REDIRECTS);
|
||||
http.setTimeout(5000);
|
||||
http.setTimeout(20000);
|
||||
const int httpCode = http.GET();
|
||||
if (httpCode == 200) {
|
||||
drawJsonStream(http.getStream(), filename, taginfo, imageParams);
|
||||
|
||||
@@ -6,6 +6,7 @@ const WAKEUP_REASON_GPIO = 2;
|
||||
const WAKEUP_REASON_NFC = 3;
|
||||
const WAKEUP_REASON_BUTTON1 = 4;
|
||||
const WAKEUP_REASON_BUTTON2 = 5;
|
||||
const WAKEUP_REASON_BUTTON3 = 6;
|
||||
const WAKEUP_REASON_FAILED_OTA_FW = 0xE0;
|
||||
const WAKEUP_REASON_FIRSTBOOT = 0xFC;
|
||||
const WAKEUP_REASON_NETWORK_SCAN = 0xFD;
|
||||
@@ -394,7 +395,9 @@ function processTags(tagArray) {
|
||||
$('#tag' + tagmac + ' .warningicon').style.display = 'none';
|
||||
$('#tag' + tagmac).style.background = "#ffffff";
|
||||
if (element.contentMode == 12 || element.nextcheckin == 3216153600) $('#tag' + tagmac).style.background = "#e4e4e0";
|
||||
|
||||
switch (parseInt(element.wakeupReason)) {
|
||||
|
||||
case WAKEUP_REASON_TIMED:
|
||||
break;
|
||||
case WAKEUP_REASON_BOOT:
|
||||
@@ -414,6 +417,10 @@ function processTags(tagArray) {
|
||||
$('#tag' + tagmac + ' .nextcheckin').innerHTML = "Button 2 pressed"
|
||||
$('#tag' + tagmac).style.background = "#c8f1bb";
|
||||
break;
|
||||
case WAKEUP_REASON_BUTTON3:
|
||||
$('#tag' + tagmac + ' .nextcheckin').innerHTML = "Button 3 pressed"
|
||||
$('#tag' + tagmac).style.background = "#c8f1bb";
|
||||
break;
|
||||
case WAKEUP_REASON_NFC:
|
||||
$('#tag' + tagmac + ' .nextcheckin').innerHTML = "NFC wakeup"
|
||||
$('#tag' + tagmac).style.background = "#c8f1bb";
|
||||
|
||||
Reference in New Issue
Block a user