Correct init Door

This commit is contained in:
2022-06-14 18:31:05 +03:00
parent 88129c5692
commit 4b7e1b00d7
2 changed files with 8 additions and 8 deletions

View File

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

View File

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