From fa3bd10033295686b7a408ece27f6d7431ae5944 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=BE=D0=BA=D1=80=D0=BE=D1=82=D0=BE=D0=B2=D0=B0?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=20=D0=98=D0=B2=D0=B0=D0=BD?= Date: Fri, 1 Feb 2019 17:13:25 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D1=88=D0=B8=D0=B1=D0=BA=D0=B0=20=D0=BE?= =?UTF-8?q?=D0=B1=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=BA=D0=B8=20=D1=81=D0=BE?= =?UTF-8?q?=D1=81=D1=82=D0=BE=D1=8F=D0=BD=D0=B8=D1=8F=20=D0=BF=D0=BE=D1=80?= =?UTF-8?q?=D1=82=D0=BE=D0=B2=201902011712?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- global.th | 3 ++- main.tc | 10 +++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/global.th b/global.th index fd0d80f..75d20c9 100644 --- a/global.th +++ b/global.th @@ -9,7 +9,7 @@ #message "link global not defined" #endif -#define VERSION "2.0b_1902011653" +#define VERSION "2.0b_1902011712" #define MAX_FIFO_SIZE 20 #define BRAKER_COUNT 3 @@ -121,3 +121,4 @@ extern BrakerProcess brakers[BRAKER_COUNT]; + diff --git a/main.tc b/main.tc index 7687d23..b6cb0b6 100644 --- a/main.tc +++ b/main.tc @@ -101,10 +101,14 @@ if (!inEncCalibrate()){ // sensors process for (int i=1; i <= SENSORS; i++){ if (pinChange(i)){ - bool state = getPinStateS(i,!config.debug.EncoderStateMode); - if (getEncEnabled(i,state)) - getPinStateS(i,config.debug.EncoderStateMode); + //bool state = getPinStateS(i,!config.debug.EncoderStateMode); + bool state = getPinStateS(i,true); + if (getEncEnabled(i,state)){ + // getPinStateS(i,config.debug.EncoderStateMode); send_sensor(i,state); + } + + } } }