0
1
mirror of https://github.com/radio95-rnt/fm95.git synced 2026-02-27 03:23:54 +01:00

fix year encoding in the dcf77

This commit is contained in:
2025-04-05 21:43:54 +02:00
parent 044d46544f
commit 28a51bd8f4
2 changed files with 3 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
{ {
"port": 13452, "port": 13452,
"time": 1743768242698, "time": 1743882066314,
"version": "0.0.3" "version": "0.0.3"
} }

View File

@@ -182,8 +182,8 @@ void calculate_dcf77_bits(time_t now, int *bits) {
int year = t->tm_year % 100; int year = t->tm_year % 100;
for (int i = 0; i < 4; i++) { for (int i = 0; i < 4; i++) {
bits[50 + i] = (month % year >> i) & 1; bits[50 + i] = (year % 10 >> i) & 1;
} }
for (int i = 0; i < 4; i++) { for (int i = 0; i < 4; i++) {
bits[54 + i] = (year / 10 >> i) & 1; bits[54 + i] = (year / 10 >> i) & 1;
} }