¿ªÔÆÌåÓý

Re: Changing frequency display


Jack Purdum
 

In the updateDisplay() function, you'll find this line:

? ? sprintf(c, "%s:%.2s.%.4s", vfoActive == VFO_A ? "A" : "B" , b, ?b+2);

This line needs to be replaced with the lines marked in yellow. I've written it as a short test program, since my B40 is still in pieces.

void setup() {
? // put your setup code here, to run once:
? Serial.begin(9600);
? char c[20];
? char b[20];
? long freq = 7123456L;
? int VFO_A = 1, vfoActive = 1;

// ?sprintf(c, "%s:%.2s.%.4s", vfoActive == VFO_A ? "A" : "B" , b, ?b+2);
? ltoa(frequency, b, DEC);
? if (vfoActive == VFO_A) {
? ? strcpy(c, "A:");
? } else {
? ? strcpy(c, "B:");
? }
? strncat(c, b, 4);
? strcat(c, ".");
? strcat(c, &b[4]);?
??
? Serial.println(c);
??
}

void loop() {
}

Jack, W8TEE


From: Tim - K7PTM <tamccain@...>
To: [email protected]
Sent: Thursday, March 16, 2017 12:03 AM
Subject: [BITX20] Changing frequency display

So I have the BitX40 all running (not in a case yet). ?I also have the arduino firmware downloaded and want to make a minor change in the way the frequency is displayed. ?Instead of it being displayed as 7.XXXX I would like it to display 7XXX.X. ?Can someone help me on what changes need to be made in the programming in order to accommodate this. ?I know this is pretty superficial, but I think it would make more sense in seeing the display this way.
Thanks in advance


Join [email protected] to automatically receive all group messages.