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 ac093d6 commit 5e4189b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/JJYReceiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,19 @@ time_t JJYReceiver::getTime() {
time_t diff2 = labs(localtime[1] - localtime[2]);
time_t diff3 = labs(localtime[2] - localtime[0]);
if( diff1 < 2){
state = TIMEVALID;
power(false);
if(state != TIMEVALID) globaltime = localtime[1];
state = TIMEVALID;
return localtime[1];
}else if(diff2 < 2){
state = TIMEVALID;
power(false);
if(state != TIMEVALID) globaltime = localtime[2];
state = TIMEVALID;
return localtime[2];
}else if(diff3 < 2){
state = TIMEVALID;
power(false);
if(state != TIMEVALID) globaltime = localtime[0];
state = TIMEVALID;
return localtime[0];
}
//DEBUG_PRINT(diff1);
Expand Down

0 comments on commit 5e4189b

Please sign in to comment.