Skip to content

Commit

Permalink
Doc
Browse files Browse the repository at this point in the history
  • Loading branch information
pu2clr committed Jul 30, 2024
1 parent b2afe17 commit 71aad30
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ void setup() {
if ( keyValue[KEY_RDS].value[keyValue[KEY_RDS].key].idx == 1 ) {
// delay(200);
tx.rdsInitTx();
tx.rdsSetMode(1); // Received bit-stream have both RDS and MMBS blocks (‘E’ block)
tx.rdsSetMode(0); // Received bit-stream have both RDS and MMBS blocks (‘E’ block)
tx.rdsSetPTY(8); // Science
tx.rdsSendStationName(rdsStationName);
}
Expand Down Expand Up @@ -605,7 +605,7 @@ uint8_t doMenu(uint8_t idxMenu) {
return 1;
}
// Main loop
uint8_t pty = 1;
uint8_t pty = 0;
void loop() {
int8_t key;
if (menuLevel == 0) {
Expand All @@ -620,7 +620,7 @@ void loop() {
// RDS UNDER CONSTRUCTION...
if ( keyValue[KEY_RDS].value[keyValue[KEY_RDS].key].idx == 1 ) {
if ( (millis() - rdsTime) > 61000 ) {
tx.rdsSetPTY(pty++); // Document.
tx.rdsSetPTY(++pty); // Document.
if (pty > 30 ) pty = 1;
tx.rdsSendRTMessage((char *) "PU2CLR QN8066 Arduino Library");
// tx.rdsSendProgramService(rdsStationName);
Expand Down
14 changes: 6 additions & 8 deletions src/QN8066.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1153,10 +1153,12 @@ void QN8066::rdsSendStationName(const char* stationName) {
b2.commonFields.trafficProgramCode = this->rdsTP;
b2.commonFields.versionCode = 1;
b2.commonFields.groupType = 0;
b2.commonFields.textABFlag = 1;

for (uint8_t i = 0; i < 8; i+=2) {
b4.field.content[0] = stationName[i];
b4.field.content[1] = stationName[i+1];
b4.field.content[1] = stationName[i+1];
b2.commonFields.textABFlag = !b2.commonFields.textABFlag;
this->rdsSendGroup(b1.pi, b2.raw, b1.pi, b4.raw);
}

Expand Down Expand Up @@ -1215,13 +1217,14 @@ void QN8066::rdsSendRTMessage(char *rtText) {
int numGroups = (textLen + 3) / 4; // Each group can contain 4 characters
RDS_BLOCK1 block1;
block1.pi = this->rdsPI;
bool toggle = false;

for (uint8_t i = 0; i < numGroups; i++) {

toggle = !toggle;
RDS_BLOCK2 block2 = {
.group2Field = {
.address = i,
.textABFlag = 0, // Set as needed
.textABFlag = toggle,
.programType = this->rdsPTY,
.trafficProgramCode = this->rdsTP,
.versionCode = 0, // Version A
Expand All @@ -1236,11 +1239,6 @@ void QN8066::rdsSendRTMessage(char *rtText) {
}
}

void sendBlock(uint16_t block) {
// Function implementation to send a data block
}




/** @defgroup group99 Helper and Tools functions*/
Expand Down

0 comments on commit 71aad30

Please sign in to comment.