Skip to content

Commit

Permalink
ydayの計算を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
Blue-Crescent committed Jan 2, 2025
1 parent 3a65209 commit 6b3456b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/JJYReceiver.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ class JJYReceiver {
uint16_t year, yday;
year = (((jjydata[index].bits.year & 0xf0) >> 4) * 10 + (jjydata[index].bits.year & 0x0f)) + 2000;
timeinfo.tm_year = year - 1900; //
yday = ((((jjydata[index].bits.doyh >> 5) & 0x0002)) * 100) + (((jjydata[index].bits.doyh & 0x000f)) * 10) + jjydata[index].bits.doyl;
yday = ((((jjydata[index].bits.doyh >> 5) & 0x0003)) * 100) + (((jjydata[index].bits.doyh & 0x000f)) * 10) + jjydata[index].bits.doyl;
calculateDate(year, yday ,(uint8_t*) &timeinfo.tm_mon,(uint8_t*) &timeinfo.tm_mday);
timeinfo.tm_hour = ((jjydata[index].bits.hour >> 5) & 0x3) * 10 + (jjydata[index].bits.hour & 0x0f) ; //
timeinfo.tm_min = ((jjydata[index].bits.min >> 5) & 0x7) * 10 + (jjydata[index].bits.min & 0x0f) + offset; //
Expand Down

0 comments on commit 6b3456b

Please sign in to comment.