doubleclick fix & TIMER_INT compiler option

This commit is contained in:
2021-08-02 12:36:26 +03:00
parent 64a2bb7eea
commit 8e96b4623f
7 changed files with 11 additions and 5 deletions

View File

@@ -11,4 +11,5 @@
-DMDNS_ENABLE
-DMCP23017
-DCORS=\"http://lazyhome.ru\"
-DTIMER_INT

View File

@@ -6,3 +6,4 @@
#-DPID_DISABLE
-DARDUINO_OTA_MDNS_DISABLE
-DMDNS_ENABLE
-DTIMER_INT

View File

@@ -6,3 +6,4 @@
#-DPID_DISABLE
-DARDUINO_OTA_MDNS_DISABLE
-DMDNS_ENABLE
-DTIMER_INT

View File

@@ -11,3 +11,4 @@
#-DPID_DISABLE
-DARDUINO_OTA_MDNS_DISABLE
-DMDNS_ENABLE
-DTIMER_INT

Binary file not shown.

View File

@@ -797,7 +797,8 @@ if (cause != CHECK_INTERRUPT) switch (store->state) //Timer based transitions
if ( //No future
!aJson.getObjectItem(inputObj, "scmd2") &&
!aJson.getObjectItem(inputObj, "lcmd2") &&
!aJson.getObjectItem(inputObj, "rpcmd2")
!aJson.getObjectItem(inputObj, "rpcmd2") &&
!aJson.getObjectItem(inputObj, "dclick")
)
res = changeState(IS_PRESSED, cause);
@@ -829,7 +830,8 @@ if (cause != CHECK_INTERRUPT) switch (store->state) //Timer based transitions
if ( //No future
!aJson.getObjectItem(inputObj, "scmd2") &&
!aJson.getObjectItem(inputObj, "lcmd2") &&
!aJson.getObjectItem(inputObj, "rpcmd2")
!aJson.getObjectItem(inputObj, "rpcmd2") &&
!aJson.getObjectItem(inputObj, "dclick")
) res = changeState(IS_IDLE, cause);
else res = changeState(IS_RELEASED2, cause);
break;

View File

@@ -1622,7 +1622,7 @@ void TimerHandler(void)
}
#if defined(__SAM3X8E__)
#if defined(__SAM3X8E__) && defined (TIMER_INT)
int16_t attachTimer(double microseconds, timerCallback callback, const char* TimerName)
{
if (timerNumber!=-1) return timerNumber;
@@ -1726,8 +1726,7 @@ void setup_main() {
infoSerial<<QUOTE(W5500_CS_PIN)<<endl;
#endif
loadConfigFromEEPROM();
#if defined(__SAM3X8E__)
loadConfigFromEEPROM();
}
void printFirmwareVersionAndBuildOptions() {
@@ -2147,6 +2146,7 @@ configLocked++;
yield();
input = input->next;
}
#if defined(__SAM3X8E__) && defined (TIMER_INT)
// Interval in microsecs
attachTimer(TIMER_CHECK_INPUT * 1000, TimerHandler, "ITimer");
#endif