mirror of
https://github.com/anklimov/lighthub
synced 2025-12-06 19:59:50 +03:00
doubleclick fix & TIMER_INT compiler option
This commit is contained in:
@@ -11,4 +11,5 @@
|
||||
-DMDNS_ENABLE
|
||||
-DMCP23017
|
||||
-DCORS=\"http://lazyhome.ru\"
|
||||
-DTIMER_INT
|
||||
|
||||
|
||||
@@ -6,3 +6,4 @@
|
||||
#-DPID_DISABLE
|
||||
-DARDUINO_OTA_MDNS_DISABLE
|
||||
-DMDNS_ENABLE
|
||||
-DTIMER_INT
|
||||
|
||||
@@ -6,3 +6,4 @@
|
||||
#-DPID_DISABLE
|
||||
-DARDUINO_OTA_MDNS_DISABLE
|
||||
-DMDNS_ENABLE
|
||||
-DTIMER_INT
|
||||
|
||||
@@ -11,3 +11,4 @@
|
||||
#-DPID_DISABLE
|
||||
-DARDUINO_OTA_MDNS_DISABLE
|
||||
-DMDNS_ENABLE
|
||||
-DTIMER_INT
|
||||
|
||||
Binary file not shown.
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
@@ -1727,7 +1727,6 @@ void setup_main() {
|
||||
#endif
|
||||
|
||||
loadConfigFromEEPROM();
|
||||
#if defined(__SAM3X8E__)
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user