diff --git a/MainDoor/platformio.ini b/MainDoor/platformio.ini index 486c532..5af6e23 100644 --- a/MainDoor/platformio.ini +++ b/MainDoor/platformio.ini @@ -15,8 +15,8 @@ framework = arduino board_build.f_cpu = 26000000L board_build.ldscript = eagle.flash.1m.ld ;board_build.flash_mode = dout -;upload_protocol = espota -;upload_port = 192.168.1.25 +upload_protocol = espota +upload_port = 192.168.1.154 lib_deps = # RECOMMENDED # Accept new functionality in a backwards compatible manner and patches diff --git a/MainDoor/src/main.cpp b/MainDoor/src/main.cpp index 608e8f3..d71dae4 100644 --- a/MainDoor/src/main.cpp +++ b/MainDoor/src/main.cpp @@ -41,6 +41,7 @@ leds msg = leds(L_MSG, 300, true); unsigned long cRun = 0; unsigned long l_run; uint8_t tP, iP, dP, sP, door, doorP; +uint8_t tC, iC, dC, sC; //uint16_t timeT, timeI, timeD, timeS; //uint16_t timeTt, timeIt, timeDt, timeSt; // uint16_t timeAlm, timeOpen; @@ -229,11 +230,11 @@ void setup() { Serial.printf("Read PCF Err=%d\n", pcf.lastError()); else Serial.println("Read PCF OK"); - tP = pcfreg & 0x1; - iP = (pcfreg >> L_INT) & 0x1; - dP = (pcfreg >> L_DOWN) & 0x1; - sP = (pcfreg >> L_SMALL) & 0x1; - doorP = (pcfreg >> DOOR) & 0x1;// tP = digitalRead(L_TOP); + tP = tC = pcfreg & 0x1; + iP = iC =(pcfreg >> L_INT) & 0x1; + dP = dC =(pcfreg >> L_DOWN) & 0x1; + sP = sC = (pcfreg >> L_SMALL) & 0x1; + doorP = door = (pcfreg >> DOOR) & 0x1;// tP = digitalRead(L_TOP); // iP = digitalRead(L_INT); // dP = digitalRead(L_DOWN); // sP = digitalRead(L_SMALL); @@ -251,7 +252,6 @@ void loop() { // uint8_t iC = digitalRead(L_INT); // uint8_t dC = digitalRead(L_DOWN); // uint8_t sC = digitalRead(L_SMALL); - uint8_t tC, iC, dC, sC; //char v[10]; msg.tick(); //door = digitalRead(DOOR);