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
|
-DMDNS_ENABLE
|
||||||
-DMCP23017
|
-DMCP23017
|
||||||
-DCORS=\"http://lazyhome.ru\"
|
-DCORS=\"http://lazyhome.ru\"
|
||||||
|
-DTIMER_INT
|
||||||
|
|
||||||
|
|||||||
@@ -6,3 +6,4 @@
|
|||||||
#-DPID_DISABLE
|
#-DPID_DISABLE
|
||||||
-DARDUINO_OTA_MDNS_DISABLE
|
-DARDUINO_OTA_MDNS_DISABLE
|
||||||
-DMDNS_ENABLE
|
-DMDNS_ENABLE
|
||||||
|
-DTIMER_INT
|
||||||
|
|||||||
@@ -6,3 +6,4 @@
|
|||||||
#-DPID_DISABLE
|
#-DPID_DISABLE
|
||||||
-DARDUINO_OTA_MDNS_DISABLE
|
-DARDUINO_OTA_MDNS_DISABLE
|
||||||
-DMDNS_ENABLE
|
-DMDNS_ENABLE
|
||||||
|
-DTIMER_INT
|
||||||
|
|||||||
@@ -11,3 +11,4 @@
|
|||||||
#-DPID_DISABLE
|
#-DPID_DISABLE
|
||||||
-DARDUINO_OTA_MDNS_DISABLE
|
-DARDUINO_OTA_MDNS_DISABLE
|
||||||
-DMDNS_ENABLE
|
-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
|
if ( //No future
|
||||||
!aJson.getObjectItem(inputObj, "scmd2") &&
|
!aJson.getObjectItem(inputObj, "scmd2") &&
|
||||||
!aJson.getObjectItem(inputObj, "lcmd2") &&
|
!aJson.getObjectItem(inputObj, "lcmd2") &&
|
||||||
!aJson.getObjectItem(inputObj, "rpcmd2")
|
!aJson.getObjectItem(inputObj, "rpcmd2") &&
|
||||||
|
!aJson.getObjectItem(inputObj, "dclick")
|
||||||
)
|
)
|
||||||
res = changeState(IS_PRESSED, cause);
|
res = changeState(IS_PRESSED, cause);
|
||||||
|
|
||||||
@@ -829,7 +830,8 @@ if (cause != CHECK_INTERRUPT) switch (store->state) //Timer based transitions
|
|||||||
if ( //No future
|
if ( //No future
|
||||||
!aJson.getObjectItem(inputObj, "scmd2") &&
|
!aJson.getObjectItem(inputObj, "scmd2") &&
|
||||||
!aJson.getObjectItem(inputObj, "lcmd2") &&
|
!aJson.getObjectItem(inputObj, "lcmd2") &&
|
||||||
!aJson.getObjectItem(inputObj, "rpcmd2")
|
!aJson.getObjectItem(inputObj, "rpcmd2") &&
|
||||||
|
!aJson.getObjectItem(inputObj, "dclick")
|
||||||
) res = changeState(IS_IDLE, cause);
|
) res = changeState(IS_IDLE, cause);
|
||||||
else res = changeState(IS_RELEASED2, cause);
|
else res = changeState(IS_RELEASED2, cause);
|
||||||
break;
|
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)
|
int16_t attachTimer(double microseconds, timerCallback callback, const char* TimerName)
|
||||||
{
|
{
|
||||||
if (timerNumber!=-1) return timerNumber;
|
if (timerNumber!=-1) return timerNumber;
|
||||||
@@ -1727,7 +1727,6 @@ void setup_main() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
loadConfigFromEEPROM();
|
loadConfigFromEEPROM();
|
||||||
#if defined(__SAM3X8E__)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void printFirmwareVersionAndBuildOptions() {
|
void printFirmwareVersionAndBuildOptions() {
|
||||||
@@ -2147,6 +2146,7 @@ configLocked++;
|
|||||||
yield();
|
yield();
|
||||||
input = input->next;
|
input = input->next;
|
||||||
}
|
}
|
||||||
|
#if defined(__SAM3X8E__) && defined (TIMER_INT)
|
||||||
// Interval in microsecs
|
// Interval in microsecs
|
||||||
attachTimer(TIMER_CHECK_INPUT * 1000, TimerHandler, "ITimer");
|
attachTimer(TIMER_CHECK_INPUT * 1000, TimerHandler, "ITimer");
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user