mirror of
https://github.com/anklimov/lighthub
synced 2025-12-12 14:49:50 +03:00
input handle improved, +stm env -2due envs
This commit is contained in:
@@ -288,10 +288,16 @@ void DMXOUT_propagate()
|
||||
if (!step) step=1;
|
||||
|
||||
if (delta<0)
|
||||
{DmxWrite2(i,currLevel+step);debugSerial<<"<";}
|
||||
{
|
||||
DmxWrite2(i,currLevel+step);
|
||||
//debugSerial<<"<";
|
||||
}
|
||||
|
||||
if (delta>0)
|
||||
{DmxWrite2(i,currLevel-step);debugSerial<<">";}
|
||||
{
|
||||
DmxWrite2(i,currLevel-step);
|
||||
//debugSerial<<">";
|
||||
}
|
||||
}
|
||||
}
|
||||
checkTimestamp=now;
|
||||
|
||||
@@ -655,7 +655,7 @@ static volatile uint8_t contactPollBusy = 0;
|
||||
|
||||
void Input::contactPoll(short cause) {
|
||||
boolean currentInputState;
|
||||
if (!store || contactPollBusy) return;
|
||||
if (!store /*|| contactPollBusy*/) return;
|
||||
contactPollBusy++;
|
||||
|
||||
changeState(IS_REQSTATE,cause); //Check for postponed states transitions
|
||||
|
||||
@@ -55,7 +55,7 @@ e-mail anklimov@gmail.com
|
||||
|
||||
|
||||
|
||||
#define SAME_STATE_ATTEMPTS 3
|
||||
#define SAME_STATE_ATTEMPTS 2
|
||||
#define ANALOG_STATE_ATTEMPTS 6
|
||||
#define ANALOG_NOIZE 1
|
||||
|
||||
|
||||
@@ -1605,13 +1605,17 @@ void postTransmission() {
|
||||
|
||||
volatile unsigned long timerCount=0;
|
||||
volatile int16_t timerNumber=-1;
|
||||
volatile int8_t timerHandlerBusy=0;
|
||||
|
||||
void TimerHandler(void)
|
||||
{ interrupts();
|
||||
{
|
||||
timerHandlerBusy++;
|
||||
interrupts();
|
||||
timerCount=micros();
|
||||
if (configLoaded) inputLoop(CHECK_INTERRUPT);
|
||||
if (configLoaded && !timerHandlerBusy) inputLoop(CHECK_INTERRUPT);
|
||||
DMXOUT_propagate();
|
||||
timerCount=micros()-timerCount;
|
||||
|
||||
timerHandlerBusy--;
|
||||
}
|
||||
|
||||
#if defined(__SAM3X8E__) && defined (TIMER_INT)
|
||||
@@ -2017,8 +2021,9 @@ void owIdle(void) {
|
||||
if (artnet && (lanStatus>=HAVE_IP_ADDRESS)) artnet->read();
|
||||
#endif
|
||||
|
||||
wdt_res();
|
||||
return;
|
||||
wdt_res();
|
||||
inputLoop(CHECK_INTERRUPT);
|
||||
return; //?????
|
||||
|
||||
#ifdef _dmxin
|
||||
yield();
|
||||
|
||||
@@ -162,7 +162,7 @@ extern Streamlog errorSerial;
|
||||
#ifdef Wiz5500
|
||||
#include <Ethernet2.h>
|
||||
#else
|
||||
#ifdef ARDUINO_ARCH_STM32
|
||||
#ifdef UIPETHERNET
|
||||
#include "UIPEthernet.h"
|
||||
#else
|
||||
#include <Ethernet.h>
|
||||
|
||||
Reference in New Issue
Block a user