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

View File

@ -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)
//7-6 Batt-Chg (6/8/10 Hours (#11) 00 = 6 Hours, 01 = 8 Hours, 10 = 10 Hours
//CAT_BUFF[0] = 0x08;
cat[0] = 12000 / globalSettings.cwDitDurationMs - 4;
cat[0] = 1200 / globalSettings.cwDitDurationMs - 4;
cat[1] = 0xB2;
break;
case 0x63 : //

View File

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