Skip to main content

Fixed bugs found in uBITX -

I am an embedded programmer, but I first tried arduino. Arduino knew only that it was used for learning purposes. However, it is based on C and it seems to have considerable applicability. In particular, a concise structure makes it easy to write code.

I found some error, but easy fixed because of very small bug.

1.CW Side Tone Configuration - Error
  https://www.youtube.com/edit?o=U&video_id=1EPPknBQNLY

 There is no response when PTT is pressed after CW side tone is set. but this is very simple problem, i fixed code and send information to administrator of uBITX source code


before fixed code

while (digitalRead(PTT) == LOW || !btnDown())
{
knob = enc_read();
if (knob > 0 && sideTone < 2000)
sideTone += 10;
else if (knob < 0 && sideTone > 100 )
sideTone -= 10;
else
continue; //don't update the frequency or the display
tone(CW_TONE, sideTone);
itoa(sideTone, b, 10);
printLine2(b);
delay(100);
}
noTone(CW_TONE);
//save the setting
if (digitalRead(PTT) == LOW){
printLine2("Sidetone set! ");
EEPROM.put(CW_SIDETONE, usbCarrier);
delay(2000);
}
else
sideTone = prev_sideTone;

when loop condition is digitalRead(PTT) = LOW but save setting condition is if  (digitalRead(PTT) == LOW)

fixed =>


while (digitalRead(PTT) == HIGH && !btnDown())
{
knob = enc_read();

2.Alignment and point position problem when displaying frequency




Less than 1Mhz




Original code

if (frequency < 10000000l){
c[6] = ' ';
c[7] = b[0];
strcat(c, ".");
strncat(c, &b[1], 3);
strcat(c, ".");
strncat(c, &b[4], 3);
}
else {
strncat(c, b, 2);
strcat(c, ".");
strncat(c, &b[2], 3);
strcat(c, ".");
strncat(c, &b[5], 3);
}
if (inTx)
strcat(c, " TX");
printLine(1, c);



Fixed code


for (int i = 15; i >= 6; i--) {
if (tmpFreq > 0) {
if (i == 12 || i == 8) c[i] = '.';
else {
c[i] = tmpFreq % 10 + 0x30;
tmpFreq /= 10;
}
}
else
c[i] = ' ';
}
if (inTx)
strcat(c, " TX");
printLine(1, c);







with bug fixes, memory usage was also reduced.


3.Frequency Limit Error
  defined variable frequency has unsigned long type
  when frequency is decrease by dial(Knob), if frequency is less then 0, frequency is overflow

Error when changing frequency in uBITX(Before fixed)
https://www.youtube.com/watch?v=3UR6ajH4dLQ



Fixed bug
https://youtu.be/Njqci2RGvQk



4.And fixed more bugs...


source code is https://github.com/phdlee/ubitx
Compiled firmware and an easy way to upgrade are coming soon.
You do not have to worry because you can go back to the original firmware at any time.


DE KD8CEC / Ph.D Ian lee
73





Comments

Popular posts from this blog

Introduction to UV-K5 HF Fullband receive version 0.3

Introduction to UV-K5 HF Fullband receive Version 0.3 This is an introduction to UV-K5 HF full-band reception firmware 0.3HF using SI4732-A10. This version is released separately from the existing UV-K5 CEC firmware version. because space is needed to store a large PATCH file to use SI4732-A10's SSB. 0.3HF added several functions to use SSB for shortwave radio and amateur radio.

Release CEC Firmware v1.200 for uBITX All version(include V2, V3, V4, V5)

Release CEC Firmware v1.200 for uBITX All Version (include v2, v3, v4, v5) I did the firmware work for v5 when uBITX V5 was released, but I release it now. I received the feedback from a thankful beta tester and tested it myself by converting my uBITX v3 to v5 but I was not sure. I ordered the uBITX V5 and delivered the correct uBITX V5, so I made a little more fine-tuning. If you use V2, V3, V4, you do not need to update this firmware.

Introduction to UV-K5 HF Fullband receive version 0.41 (Changed from 0.40)

  Introduction to UV-K5 HF Fullband receive Version 0.41 (Changed from 0.40) This is an introduction to UV-K5 HF full-band reception firmware 0.4HF using SI4732-A10. This version is released separately from the existing UV-K5 CEC firmware version. because space is needed to store a large PATCH file to use SI4732-A10's SSB. 0.4HF added several functions to use SSB for shortwave radio and amateur radio.