From 5df55ed9461805f1743d71e21e8db05fff164f29 Mon Sep 17 00:00:00 2001 From: KubaPro010 Date: Wed, 6 Aug 2025 13:08:19 +0200 Subject: [PATCH] I belive this is the fix to #6 --- src/pifmrds/pi_fm_rds.cpp | 2 +- src/pifmrds/rds_test.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pifmrds/pi_fm_rds.cpp b/src/pifmrds/pi_fm_rds.cpp index b7b807e..f0e3459 100644 --- a/src/pifmrds/pi_fm_rds.cpp +++ b/src/pifmrds/pi_fm_rds.cpp @@ -390,7 +390,6 @@ int main(int argc, char **argv) { alternative_freq[af_size] = (int)(10*atof(param))-875; if(alternative_freq[af_size] < 1 || alternative_freq[af_size] > 204) fatal("Alternative Frequency has to be set in range of 87.6 Mhz - 107.9 Mhz\n"); - memcpy(data.af_array, alternative_freq, sizeof(alternative_freq)); } else { fatal("Unrecognised argument: %s.\n" @@ -400,6 +399,7 @@ int main(int argc, char **argv) { } alternative_freq[0] = af_size; + memcpy(data.af_array, alternative_freq, sizeof(alternative_freq)); int FifoSize=DATA_SIZE*2; //fmmod=new ngfmdmasync(carrier_freq,228000,14,FifoSize, false, gpiopin); //you can mod fmmod=new ngfmdmasync(data.carrier_freq,228000,14,FifoSize, false); diff --git a/src/pifmrds/rds_test.cpp b/src/pifmrds/rds_test.cpp index 1766484..3d1a974 100644 --- a/src/pifmrds/rds_test.cpp +++ b/src/pifmrds/rds_test.cpp @@ -10,7 +10,7 @@ extern "C" int main() { set_rds_pi(0xff); set_rds_ps("TEST"); - int af_array[] = {0, 1, 2, 3}; + int af_array[] = {3, 2, 1, 0}; set_rds_af(af_array); for(int i = 0; i < 32; i++) { int buffer[BITS_PER_GROUP];