From 39fd7af6c5a9f75549c8d2c6c1b1ec846876b471 Mon Sep 17 00:00:00 2001 From: BlueCrescent Date: Sat, 17 Feb 2024 16:11:33 +0900 Subject: [PATCH 1/9] =?UTF-8?q?global=20time=E4=B8=AD=E9=96=93=E3=83=87?= =?UTF-8?q?=E3=83=BC=E3=82=BF=E5=8F=8D=E6=98=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library.properties | 2 +- src/JJYReceiver.cpp | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/library.properties b/library.properties index 797f5fb..d18f68d 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=JJYReceiver -version=0.7.3 +version=0.7.4 author=BlueCrescent maintainer=BlueCrescent sentence=JJY standard radio signal wave receiver library. diff --git a/src/JJYReceiver.cpp b/src/JJYReceiver.cpp index 8fbe7bb..6cc251d 100644 --- a/src/JJYReceiver.cpp +++ b/src/JJYReceiver.cpp @@ -95,17 +95,20 @@ void JJYReceiver::shift_in(uint8_t data,volatile uint8_t* sampling, int length){ bool JJYReceiver::timeCheck(){ int compare[6][2] = {{0, 1}, {0, 2}, {1, 0}, {1, 2}, {2, 0}, {2, 1}}; - uint8_t min1,min2; + uint8_t min[2]; + uint8_t hour00[2]; for (int i = 0; i < 6; i++) { - min1 = ((jjydata[compare[i][0]].bits.min >> 5) & 0x7) * 10 + (jjydata[compare[i][0]].bits.min & 0x0f) + 1; - min2 = ((jjydata[compare[i][1]].bits.min >> 5) & 0x7) * 10 + (jjydata[compare[i][1]].bits.min & 0x0f) + 2; + min[0] = ((jjydata[compare[i][0]].bits.min >> 5) & 0x7) * 10 + (jjydata[compare[i][0]].bits.min & 0x0f) + 1; + min[1] = ((jjydata[compare[i][1]].bits.min >> 5) & 0x7) * 10 + (jjydata[compare[i][1]].bits.min & 0x0f) + 2; + hour00[0] = min[0] ? 1 : 0; + hour00[1] = min[1] ? 1 : 0; if (jjydata[compare[i][0]].bits.year == jjydata[compare[i][1]].bits.year && jjydata[compare[i][0]].bits.doyh == jjydata[compare[i][1]].bits.doyh && jjydata[compare[i][0]].bits.doyl == jjydata[compare[i][1]].bits.doyl && - jjydata[compare[i][0]].bits.hour == jjydata[compare[i][1]].bits.hour && - (abs((min2 - min1 + 60) % 60) <= 2)) + (jjydata[compare[i][0]].bits.hour + hour00[0]) == (jjydata[compare[i][1]].bits.hour + hour00[1]) && + (abs((min[1] - min[0] + 60) % 60) <= 2)) { - last_jjydata[0] = (min2 > min1) ? jjydata[compare[i][1]] : jjydata[compare[i][0]]; + last_jjydata[0] = (min[1] > min[0]) ? jjydata[compare[i][1]] : jjydata[compare[i][0]]; state = TIMEVALID; power(false); return true; @@ -132,6 +135,7 @@ time_t JJYReceiver::getTime() { timeavailable = -1; switch(reliability){ case 1: + globaltime = updateTimeInfo(jjydata,rcvcnt,1); return temp_time; break; } From d81bcb67cc2a0d22f5554827dda741a353e9c1da Mon Sep 17 00:00:00 2001 From: BlueCrescent Date: Sat, 17 Feb 2024 16:29:39 +0900 Subject: [PATCH 2/9] HASTY mode --- src/JJYReceiver.cpp | 15 +++++++++++---- src/JJYReceiver.h | 7 ++++++- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/JJYReceiver.cpp b/src/JJYReceiver.cpp index 6cc251d..312d75d 100644 --- a/src/JJYReceiver.cpp +++ b/src/JJYReceiver.cpp @@ -133,9 +133,12 @@ time_t JJYReceiver::getTime() { if(timeavailable == -1) return -1; temp_time = updateTimeInfo(jjydata,timeavailable,1); timeavailable = -1; - switch(reliability){ - case 1: - globaltime = updateTimeInfo(jjydata,rcvcnt,1); + switch(mode){ + case HASTY: + if(operation == BOOT){ + temp_time = updateTimeInfo(jjydata,rcvcnt,1); + globaltime = temp_time; + } return temp_time; break; } @@ -286,9 +289,13 @@ void JJYReceiver::monitor(int pin){ monitorpin = pin; } -void JJYReceiver::begin(){ +void JJYReceiver::begin(uint8_t updatemode){ + mode = updatemode; init(); } +void JJYReceiver::begin(){ + begin(NORMAL); +} void JJYReceiver::stop(){ power(false); diff --git a/src/JJYReceiver.h b/src/JJYReceiver.h index 80be122..fedac21 100644 --- a/src/JJYReceiver.h +++ b/src/JJYReceiver.h @@ -78,6 +78,8 @@ typedef union { } JJYData; class JJYReceiver { + enum OPERATION {BOOT,OPERATION}; + enum MODE {HASTY,NORMAL,CONSERVATIVE}; enum STATE {INIT,RECEIVE,TIMEVALID,TIMETICK}; enum JJYSTATE {JJY_INIT=-1,JJY_MIN=0,JJY_HOUR=1,JJY_DOYH=2,JJY_DOYL=3,JJY_YEAR=4,JJY_WEEK=5}; @@ -87,13 +89,15 @@ class JJYReceiver { JJYData last_jjydata[1]; volatile enum STATE state = INIT; volatile enum JJYSTATE jjystate = JJY_INIT; + volatile enum OPERATION operation = BOOT; + //volatile enum MODE mode = NORMAL; + volatile enum MODE mode = HASTY; volatile uint8_t rcvcnt = 0; volatile unsigned long fallingtime[2]; volatile const int8_t datapin,selpin,ponpin; volatile int8_t monitorpin = -1; volatile uint8_t frequency = 0; volatile uint8_t markercount = 0; - volatile uint8_t reliability = 0; volatile uint8_t quality = 0; volatile uint8_t tick = 0; @@ -122,6 +126,7 @@ class JJYReceiver { void shift_in(uint8_t data,volatile uint8_t* sampling, int length); void clear(volatile uint8_t* sampling, int length); void begin(); + void begin(uint8_t mode); void stop(); bool power(bool powerstate); bool power(); From fc77de359725828a45c1e48f5dbd7dc981866a19 Mon Sep 17 00:00:00 2001 From: BlueCrescent Date: Sat, 17 Feb 2024 16:31:07 +0900 Subject: [PATCH 3/9] HASTY MODE --- src/JJYReceiver.cpp | 2 +- src/JJYReceiver.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/JJYReceiver.cpp b/src/JJYReceiver.cpp index 312d75d..9d59107 100644 --- a/src/JJYReceiver.cpp +++ b/src/JJYReceiver.cpp @@ -290,7 +290,7 @@ void JJYReceiver::monitor(int pin){ } void JJYReceiver::begin(uint8_t updatemode){ - mode = updatemode; + mode = static_cast(updatemode); init(); } void JJYReceiver::begin(){ diff --git a/src/JJYReceiver.h b/src/JJYReceiver.h index fedac21..7906699 100644 --- a/src/JJYReceiver.h +++ b/src/JJYReceiver.h @@ -79,7 +79,7 @@ typedef union { class JJYReceiver { enum OPERATION {BOOT,OPERATION}; - enum MODE {HASTY,NORMAL,CONSERVATIVE}; + enum MODE {HASTY=1,NORMAL=0,CONSERVATIVE=2}; enum STATE {INIT,RECEIVE,TIMEVALID,TIMETICK}; enum JJYSTATE {JJY_INIT=-1,JJY_MIN=0,JJY_HOUR=1,JJY_DOYH=2,JJY_DOYL=3,JJY_YEAR=4,JJY_WEEK=5}; From 9cdebc991e8901c82a96f536dbf5aae4998f9917 Mon Sep 17 00:00:00 2001 From: BlueCrescent Date: Mon, 19 Feb 2024 18:35:03 +0900 Subject: [PATCH 4/9] =?UTF-8?q?=E5=8F=97=E4=BF=A1=E9=83=A8=E5=88=86?= =?UTF-8?q?=E3=81=AE=E6=9C=80=E9=81=A9=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/JJYReceiver.cpp | 35 +++++++++++++---------------------- src/JJYReceiver.h | 21 ++++++++------------- 2 files changed, 21 insertions(+), 35 deletions(-) diff --git a/src/JJYReceiver.cpp b/src/JJYReceiver.cpp index 9d59107..544cd37 100644 --- a/src/JJYReceiver.cpp +++ b/src/JJYReceiver.cpp @@ -100,8 +100,8 @@ bool JJYReceiver::timeCheck(){ for (int i = 0; i < 6; i++) { min[0] = ((jjydata[compare[i][0]].bits.min >> 5) & 0x7) * 10 + (jjydata[compare[i][0]].bits.min & 0x0f) + 1; min[1] = ((jjydata[compare[i][1]].bits.min >> 5) & 0x7) * 10 + (jjydata[compare[i][1]].bits.min & 0x0f) + 2; - hour00[0] = min[0] ? 1 : 0; - hour00[1] = min[1] ? 1 : 0; + hour00[0] = ( min[0] == 0 ) ? 1 : 0; + hour00[1] = ( min[1] == 0 ) ? 1 : 0; if (jjydata[compare[i][0]].bits.year == jjydata[compare[i][1]].bits.year && jjydata[compare[i][0]].bits.doyh == jjydata[compare[i][1]].bits.doyh && jjydata[compare[i][0]].bits.doyl == jjydata[compare[i][1]].bits.doyl && @@ -133,12 +133,8 @@ time_t JJYReceiver::getTime() { if(timeavailable == -1) return -1; temp_time = updateTimeInfo(jjydata,timeavailable,1); timeavailable = -1; - switch(mode){ - case HASTY: - if(operation == BOOT){ - temp_time = updateTimeInfo(jjydata,rcvcnt,1); - globaltime = temp_time; - } + switch(reliability){ + case 1: return temp_time; break; } @@ -147,6 +143,9 @@ time_t JJYReceiver::getTime() { globaltime = updateTimeInfo(last_jjydata,0,1); state = TIMETICK; received_time = globaltime; + break; + default: + return received_time; } return received_time; } @@ -161,10 +160,10 @@ void JJYReceiver::delta_tick(){ data = digitalRead(datapin)==HIGH ? 1 : 0; shift_in(data, sampling, N); sampleindex++; - if(sampleindex == 100){ + if(95 < sampleindex){ sampleindex = 0; clear(sampling, N); - }else if(sampleindex == 90){ // クロックが揺らぐので100sampleしっかりないため少し間引く + }else if(sampleindex == 94){ #ifdef DEBUG_BUILD debug2(); #endif @@ -225,22 +224,16 @@ void JJYReceiver::delta_tick(){ } void JJYReceiver::jjy_receive(){ - unsigned long time = millis(); - unsigned long window; if(state == TIMEVALID) return; bool data = digitalRead(datapin); // ピンの状態を読み取る if (data == LOW) { if(monitorpin != -1) digitalWrite(monitorpin,LOW); - window = time - fallingtime[0]; - if(990 < window){ + if(sampleindex < 20){ sampleindex = 0; clear(sampling,N); } - fallingtime[1] = fallingtime[0]; - fallingtime[0] = time; }else{ if(monitorpin != -1) digitalWrite(monitorpin,HIGH); - } } uint8_t JJYReceiver::freq(uint8_t freq){ @@ -289,12 +282,8 @@ void JJYReceiver::monitor(int pin){ monitorpin = pin; } -void JJYReceiver::begin(uint8_t updatemode){ - mode = static_cast(updatemode); - init(); -} void JJYReceiver::begin(){ - begin(NORMAL); + init(); } void JJYReceiver::stop(){ @@ -362,6 +351,8 @@ void JJYReceiver::debug(){ case TIMEVALID: DEBUG_PRINT("TIMEVALID"); break; + default: + break; } DEBUG_PRINT(" "); DEBUG_PRINT((int)jjypayloadlen[jjystate]); diff --git a/src/JJYReceiver.h b/src/JJYReceiver.h index 7906699..c240764 100644 --- a/src/JJYReceiver.h +++ b/src/JJYReceiver.h @@ -29,8 +29,8 @@ #include #include -//#define DEBUG_BUILD -//#define DEBUG_ESP32 +#define DEBUG_BUILD +#define DEBUG_ESP32 #ifdef DEBUG_BUILD # define DEBUG_PRINT(...) Serial.print(__VA_ARGS__); @@ -78,9 +78,7 @@ typedef union { } JJYData; class JJYReceiver { - enum OPERATION {BOOT,OPERATION}; - enum MODE {HASTY=1,NORMAL=0,CONSERVATIVE=2}; - enum STATE {INIT,RECEIVE,TIMEVALID,TIMETICK}; + enum STATE {INIT,RECEIVE,TIMEVALID,TIMETICK}; enum JJYSTATE {JJY_INIT=-1,JJY_MIN=0,JJY_HOUR=1,JJY_DOYH=2,JJY_DOYL=3,JJY_YEAR=4,JJY_WEEK=5}; public: @@ -89,15 +87,13 @@ class JJYReceiver { JJYData last_jjydata[1]; volatile enum STATE state = INIT; volatile enum JJYSTATE jjystate = JJY_INIT; - volatile enum OPERATION operation = BOOT; - //volatile enum MODE mode = NORMAL; - volatile enum MODE mode = HASTY; - volatile uint8_t rcvcnt = 0; + volatile uint8_t rcvcnt = 0; volatile unsigned long fallingtime[2]; volatile const int8_t datapin,selpin,ponpin; volatile int8_t monitorpin = -1; volatile uint8_t frequency = 0; volatile uint8_t markercount = 0; + volatile uint8_t reliability = 0; volatile uint8_t quality = 0; volatile uint8_t tick = 0; @@ -107,9 +103,9 @@ class JJYReceiver { volatile uint8_t sampleindex = 0; volatile uint8_t sampling [N]; volatile int8_t timeavailable = -1; - volatile const uint8_t CONST_PM [N] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF0,0x00,0x00,0x00}; - volatile const uint8_t CONST_H [N] = {0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; - volatile const uint8_t CONST_L [N] = {0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; + volatile const uint8_t CONST_PM [N] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF0,0x00}; + volatile const uint8_t CONST_H [N] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00}; + volatile const uint8_t CONST_L [N] = {0xFF,0xFF,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; volatile time_t globaltime = 0; volatile time_t received_time = -1; @@ -126,7 +122,6 @@ class JJYReceiver { void shift_in(uint8_t data,volatile uint8_t* sampling, int length); void clear(volatile uint8_t* sampling, int length); void begin(); - void begin(uint8_t mode); void stop(); bool power(bool powerstate); bool power(); From 1fab45d6ea61ff45f86e3f4220e1f72af06d9032 Mon Sep 17 00:00:00 2001 From: BlueCrescent Date: Mon, 19 Feb 2024 18:35:03 +0900 Subject: [PATCH 5/9] =?UTF-8?q?=E5=8F=97=E4=BF=A1=E9=83=A8=E5=88=86?= =?UTF-8?q?=E3=81=AE=E6=9C=80=E9=81=A9=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/JJYReceiver.cpp | 35 +++++++++++++---------------------- src/JJYReceiver.h | 17 ++++++----------- 2 files changed, 19 insertions(+), 33 deletions(-) diff --git a/src/JJYReceiver.cpp b/src/JJYReceiver.cpp index 9d59107..0d19658 100644 --- a/src/JJYReceiver.cpp +++ b/src/JJYReceiver.cpp @@ -100,8 +100,8 @@ bool JJYReceiver::timeCheck(){ for (int i = 0; i < 6; i++) { min[0] = ((jjydata[compare[i][0]].bits.min >> 5) & 0x7) * 10 + (jjydata[compare[i][0]].bits.min & 0x0f) + 1; min[1] = ((jjydata[compare[i][1]].bits.min >> 5) & 0x7) * 10 + (jjydata[compare[i][1]].bits.min & 0x0f) + 2; - hour00[0] = min[0] ? 1 : 0; - hour00[1] = min[1] ? 1 : 0; + hour00[0] = ( min[0] == 0 ) ? 1 : 0; + hour00[1] = ( min[1] == 0 ) ? 1 : 0; if (jjydata[compare[i][0]].bits.year == jjydata[compare[i][1]].bits.year && jjydata[compare[i][0]].bits.doyh == jjydata[compare[i][1]].bits.doyh && jjydata[compare[i][0]].bits.doyl == jjydata[compare[i][1]].bits.doyl && @@ -133,12 +133,8 @@ time_t JJYReceiver::getTime() { if(timeavailable == -1) return -1; temp_time = updateTimeInfo(jjydata,timeavailable,1); timeavailable = -1; - switch(mode){ - case HASTY: - if(operation == BOOT){ - temp_time = updateTimeInfo(jjydata,rcvcnt,1); - globaltime = temp_time; - } + switch(reliability){ + case 1: return temp_time; break; } @@ -147,6 +143,9 @@ time_t JJYReceiver::getTime() { globaltime = updateTimeInfo(last_jjydata,0,1); state = TIMETICK; received_time = globaltime; + break; + default: + return received_time; } return received_time; } @@ -161,10 +160,10 @@ void JJYReceiver::delta_tick(){ data = digitalRead(datapin)==HIGH ? 1 : 0; shift_in(data, sampling, N); sampleindex++; - if(sampleindex == 100){ + if(95 < sampleindex){ sampleindex = 0; clear(sampling, N); - }else if(sampleindex == 90){ // クロックが揺らぐので100sampleしっかりないため少し間引く + }else if(sampleindex == 95){ #ifdef DEBUG_BUILD debug2(); #endif @@ -225,22 +224,16 @@ void JJYReceiver::delta_tick(){ } void JJYReceiver::jjy_receive(){ - unsigned long time = millis(); - unsigned long window; if(state == TIMEVALID) return; bool data = digitalRead(datapin); // ピンの状態を読み取る if (data == LOW) { if(monitorpin != -1) digitalWrite(monitorpin,LOW); - window = time - fallingtime[0]; - if(990 < window){ + if(sampleindex < 20){ sampleindex = 0; clear(sampling,N); } - fallingtime[1] = fallingtime[0]; - fallingtime[0] = time; }else{ if(monitorpin != -1) digitalWrite(monitorpin,HIGH); - } } uint8_t JJYReceiver::freq(uint8_t freq){ @@ -289,12 +282,8 @@ void JJYReceiver::monitor(int pin){ monitorpin = pin; } -void JJYReceiver::begin(uint8_t updatemode){ - mode = static_cast(updatemode); - init(); -} void JJYReceiver::begin(){ - begin(NORMAL); + init(); } void JJYReceiver::stop(){ @@ -362,6 +351,8 @@ void JJYReceiver::debug(){ case TIMEVALID: DEBUG_PRINT("TIMEVALID"); break; + default: + break; } DEBUG_PRINT(" "); DEBUG_PRINT((int)jjypayloadlen[jjystate]); diff --git a/src/JJYReceiver.h b/src/JJYReceiver.h index 7906699..28d9436 100644 --- a/src/JJYReceiver.h +++ b/src/JJYReceiver.h @@ -78,9 +78,7 @@ typedef union { } JJYData; class JJYReceiver { - enum OPERATION {BOOT,OPERATION}; - enum MODE {HASTY=1,NORMAL=0,CONSERVATIVE=2}; - enum STATE {INIT,RECEIVE,TIMEVALID,TIMETICK}; + enum STATE {INIT,RECEIVE,TIMEVALID,TIMETICK}; enum JJYSTATE {JJY_INIT=-1,JJY_MIN=0,JJY_HOUR=1,JJY_DOYH=2,JJY_DOYL=3,JJY_YEAR=4,JJY_WEEK=5}; public: @@ -89,15 +87,13 @@ class JJYReceiver { JJYData last_jjydata[1]; volatile enum STATE state = INIT; volatile enum JJYSTATE jjystate = JJY_INIT; - volatile enum OPERATION operation = BOOT; - //volatile enum MODE mode = NORMAL; - volatile enum MODE mode = HASTY; - volatile uint8_t rcvcnt = 0; + volatile uint8_t rcvcnt = 0; volatile unsigned long fallingtime[2]; volatile const int8_t datapin,selpin,ponpin; volatile int8_t monitorpin = -1; volatile uint8_t frequency = 0; volatile uint8_t markercount = 0; + volatile uint8_t reliability = 0; volatile uint8_t quality = 0; volatile uint8_t tick = 0; @@ -107,9 +103,9 @@ class JJYReceiver { volatile uint8_t sampleindex = 0; volatile uint8_t sampling [N]; volatile int8_t timeavailable = -1; - volatile const uint8_t CONST_PM [N] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF0,0x00,0x00,0x00}; - volatile const uint8_t CONST_H [N] = {0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; - volatile const uint8_t CONST_L [N] = {0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; + volatile const uint8_t CONST_PM [N] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF0,0x00}; + volatile const uint8_t CONST_H [N] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00}; + volatile const uint8_t CONST_L [N] = {0xFF,0xFF,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; volatile time_t globaltime = 0; volatile time_t received_time = -1; @@ -126,7 +122,6 @@ class JJYReceiver { void shift_in(uint8_t data,volatile uint8_t* sampling, int length); void clear(volatile uint8_t* sampling, int length); void begin(); - void begin(uint8_t mode); void stop(); bool power(bool powerstate); bool power(); From 1fd32cdd87653d2d8c41da89f57f98d27a125ad8 Mon Sep 17 00:00:00 2001 From: BlueCrescent Date: Mon, 19 Feb 2024 18:44:30 +0900 Subject: [PATCH 6/9] Ver up --- library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.properties b/library.properties index d18f68d..e13d51e 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=JJYReceiver -version=0.7.4 +version=0.8.0 author=BlueCrescent maintainer=BlueCrescent sentence=JJY standard radio signal wave receiver library. From c386c3ee331fc9e47fe95a264b4860602dc0ca25 Mon Sep 17 00:00:00 2001 From: BlueCrescent Date: Mon, 19 Feb 2024 18:47:57 +0900 Subject: [PATCH 7/9] =?UTF-8?q?=E7=A9=BA=E7=99=BD=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/JJYReceiver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/JJYReceiver.h b/src/JJYReceiver.h index c240764..32262ed 100644 --- a/src/JJYReceiver.h +++ b/src/JJYReceiver.h @@ -87,7 +87,7 @@ class JJYReceiver { JJYData last_jjydata[1]; volatile enum STATE state = INIT; volatile enum JJYSTATE jjystate = JJY_INIT; - volatile uint8_t rcvcnt = 0; + volatile uint8_t rcvcnt = 0; volatile unsigned long fallingtime[2]; volatile const int8_t datapin,selpin,ponpin; volatile int8_t monitorpin = -1; From 4e700716efd5f55f2751f8f460088ffa09a3f735 Mon Sep 17 00:00:00 2001 From: BlueCrescent Date: Mon, 19 Feb 2024 18:49:19 +0900 Subject: [PATCH 8/9] DEBUG_BUILD OFF --- src/JJYReceiver.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/JJYReceiver.h b/src/JJYReceiver.h index 32262ed..47dfe8a 100644 --- a/src/JJYReceiver.h +++ b/src/JJYReceiver.h @@ -29,8 +29,8 @@ #include #include -#define DEBUG_BUILD -#define DEBUG_ESP32 +//#define DEBUG_BUILD +//#define DEBUG_ESP32 #ifdef DEBUG_BUILD # define DEBUG_PRINT(...) Serial.print(__VA_ARGS__); From ef1e3e0698e7337f768efb08adc2ae29679f3c2e Mon Sep 17 00:00:00 2001 From: BlueCrescent Date: Mon, 19 Feb 2024 18:50:56 +0900 Subject: [PATCH 9/9] =?UTF-8?q?=E7=A9=BA=E7=99=BD=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/JJYReceiver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/JJYReceiver.h b/src/JJYReceiver.h index 47dfe8a..286dc6d 100644 --- a/src/JJYReceiver.h +++ b/src/JJYReceiver.h @@ -78,7 +78,7 @@ typedef union { } JJYData; class JJYReceiver { - enum STATE {INIT,RECEIVE,TIMEVALID,TIMETICK}; + enum STATE {INIT,RECEIVE,TIMEVALID,TIMETICK}; enum JJYSTATE {JJY_INIT=-1,JJY_MIN=0,JJY_HOUR=1,JJY_DOYH=2,JJY_DOYL=3,JJY_YEAR=4,JJY_WEEK=5}; public: