input handle improved, +stm env -2due envs

This commit is contained in:
2021-08-22 23:02:15 +03:00
parent bbf8f4d46e
commit 09fa78b0c8
20 changed files with 102 additions and 158 deletions

View File

@@ -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;

View File

@@ -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

View File

@@ -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

View File

@@ -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();

View File

@@ -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>