Skip to content

Commit

Permalink
getTime動作変更
Browse files Browse the repository at this point in the history
  • Loading branch information
Blue-Crescent committed Feb 7, 2024
1 parent 8a297a6 commit ac093d6
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/JJYReceiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,18 @@ time_t JJYReceiver::getTime() {
time_t diff3 = labs(localtime[2] - localtime[0]);
if( diff1 < 2){
state = TIMEVALID;
digitalWrite(ponpin,HIGH);
//power(false);
globaltime = localtime[1];
power(false);
if(state != TIMEVALID) globaltime = localtime[1];
return localtime[1];
}else if(diff2 < 2){
state = TIMEVALID;
digitalWrite(ponpin,HIGH);
//power(false);
globaltime = localtime[2];
power(false);
if(state != TIMEVALID) globaltime = localtime[2];
return localtime[2];
}else if(diff3 < 2){
state = TIMEVALID;
digitalWrite(ponpin,HIGH);
//power(false);
globaltime = localtime[0];
power(false);
if(state != TIMEVALID) globaltime = localtime[0];
return localtime[0];
}
//DEBUG_PRINT(diff1);
Expand Down

0 comments on commit ac093d6

Please sign in to comment.