1
0
mirror of https://codeberg.org/mclemens/ubitxv6.git synced 2025-02-21 06:57:27 -05:00

Fix WPM calculations

This commit is contained in:
Reed Nightingale 2020-01-03 23:43:33 -08:00
parent e9702bd955
commit 4cefa08eaf
2 changed files with 4 additions and 4 deletions

@ -211,7 +211,7 @@ void catReadEEPRom(void)
//5-0 CW Speed (4-60 WPM) (#21) From 0 to 38 (HEX) with 0 = 4 WPM and 38 = 60 WPM (1 WPM steps) //5-0 CW Speed (4-60 WPM) (#21) From 0 to 38 (HEX) with 0 = 4 WPM and 38 = 60 WPM (1 WPM steps)
//7-6 Batt-Chg (6/8/10 Hours (#11) 00 = 6 Hours, 01 = 8 Hours, 10 = 10 Hours //7-6 Batt-Chg (6/8/10 Hours (#11) 00 = 6 Hours, 01 = 8 Hours, 10 = 10 Hours
//CAT_BUFF[0] = 0x08; //CAT_BUFF[0] = 0x08;
cat[0] = 12000 / globalSettings.cwDitDurationMs - 4; cat[0] = 1200 / globalSettings.cwDitDurationMs - 4;
cat[1] = 0xB2; cat[1] = 0xB2;
break; break;
case 0x63 : // case 0x63 : //

@ -532,7 +532,7 @@ void enterFreq(){
void drawCWStatus(){ void drawCWStatus(){
strcpy(b, " cw: "); strcpy(b, " cw: ");
int wpm = 12000/globalSettings.cwDitDurationMs; int wpm = 1200/globalSettings.cwDitDurationMs;
itoa(wpm,c, 10); itoa(wpm,c, 10);
strcat(b, c); strcat(b, c);
strcat(b, "wpm, "); strcat(b, "wpm, ");
@ -770,11 +770,11 @@ void switchBand(uint32_t bandfreq){
void setCwSpeed() void setCwSpeed()
{ {
int wpm = 12000/globalSettings.cwDitDurationMs; int wpm = 1200/globalSettings.cwDitDurationMs;
wpm = getValueByKnob(1, 100, 1, wpm, "CW: ", " WPM"); wpm = getValueByKnob(1, 100, 1, wpm, "CW: ", " WPM");
globalSettings.cwDitDurationMs = 12000/wpm; globalSettings.cwDitDurationMs = 1200/wpm;
SaveSettingsToEeprom(); SaveSettingsToEeprom();
active_delay(500); active_delay(500);
drawStatusbar(); drawStatusbar();