Correct init Door
This commit is contained in:
@@ -15,8 +15,8 @@ framework = arduino
|
|||||||
board_build.f_cpu = 26000000L
|
board_build.f_cpu = 26000000L
|
||||||
board_build.ldscript = eagle.flash.1m.ld
|
board_build.ldscript = eagle.flash.1m.ld
|
||||||
;board_build.flash_mode = dout
|
;board_build.flash_mode = dout
|
||||||
;upload_protocol = espota
|
upload_protocol = espota
|
||||||
;upload_port = 192.168.1.25
|
upload_port = 192.168.1.154
|
||||||
lib_deps =
|
lib_deps =
|
||||||
# RECOMMENDED
|
# RECOMMENDED
|
||||||
# Accept new functionality in a backwards compatible manner and patches
|
# Accept new functionality in a backwards compatible manner and patches
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ leds msg = leds(L_MSG, 300, true);
|
|||||||
unsigned long cRun = 0;
|
unsigned long cRun = 0;
|
||||||
unsigned long l_run;
|
unsigned long l_run;
|
||||||
uint8_t tP, iP, dP, sP, door, doorP;
|
uint8_t tP, iP, dP, sP, door, doorP;
|
||||||
|
uint8_t tC, iC, dC, sC;
|
||||||
//uint16_t timeT, timeI, timeD, timeS;
|
//uint16_t timeT, timeI, timeD, timeS;
|
||||||
//uint16_t timeTt, timeIt, timeDt, timeSt;
|
//uint16_t timeTt, timeIt, timeDt, timeSt;
|
||||||
// uint16_t timeAlm, timeOpen;
|
// uint16_t timeAlm, timeOpen;
|
||||||
@@ -229,11 +230,11 @@ void setup() {
|
|||||||
Serial.printf("Read PCF Err=%d\n", pcf.lastError());
|
Serial.printf("Read PCF Err=%d\n", pcf.lastError());
|
||||||
else
|
else
|
||||||
Serial.println("Read PCF OK");
|
Serial.println("Read PCF OK");
|
||||||
tP = pcfreg & 0x1;
|
tP = tC = pcfreg & 0x1;
|
||||||
iP = (pcfreg >> L_INT) & 0x1;
|
iP = iC =(pcfreg >> L_INT) & 0x1;
|
||||||
dP = (pcfreg >> L_DOWN) & 0x1;
|
dP = dC =(pcfreg >> L_DOWN) & 0x1;
|
||||||
sP = (pcfreg >> L_SMALL) & 0x1;
|
sP = sC = (pcfreg >> L_SMALL) & 0x1;
|
||||||
doorP = (pcfreg >> DOOR) & 0x1;// tP = digitalRead(L_TOP);
|
doorP = door = (pcfreg >> DOOR) & 0x1;// tP = digitalRead(L_TOP);
|
||||||
// iP = digitalRead(L_INT);
|
// iP = digitalRead(L_INT);
|
||||||
// dP = digitalRead(L_DOWN);
|
// dP = digitalRead(L_DOWN);
|
||||||
// sP = digitalRead(L_SMALL);
|
// sP = digitalRead(L_SMALL);
|
||||||
@@ -251,7 +252,6 @@ void loop() {
|
|||||||
// uint8_t iC = digitalRead(L_INT);
|
// uint8_t iC = digitalRead(L_INT);
|
||||||
// uint8_t dC = digitalRead(L_DOWN);
|
// uint8_t dC = digitalRead(L_DOWN);
|
||||||
// uint8_t sC = digitalRead(L_SMALL);
|
// uint8_t sC = digitalRead(L_SMALL);
|
||||||
uint8_t tC, iC, dC, sC;
|
|
||||||
//char v[10];
|
//char v[10];
|
||||||
msg.tick();
|
msg.tick();
|
||||||
//door = digitalRead(DOOR);
|
//door = digitalRead(DOOR);
|
||||||
|
|||||||
Reference in New Issue
Block a user