Skip to content

Commit

Permalink
Merge pull request #40 from phdlee/version1.098
Browse files Browse the repository at this point in the history
Version1.098
  • Loading branch information
phdlee authored Aug 10, 2018
2 parents c6b020f + e79dbdb commit 948267b
Show file tree
Hide file tree
Showing 14 changed files with 2,045 additions and 347 deletions.
31 changes: 27 additions & 4 deletions ubitx_20/cat_libs.ino
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,35 @@ void ReadEEPRom() //for remove warnings.

Serial.write(0x02); //STX
checkSum = 0x02;
for (uint16_t i = 0; i < eepromReadLength; i++)
//I2C Scanner
//Magic Key Start 59414, Length : 48583
//if (eepromStartIndex == 59414 && eepromReadLength == 48583)
if (CAT_BUFF[0] == 0x16 && CAT_BUFF[1] == 0xe8)
{
read1Byte = EEPROM.read(eepromStartIndex + i);
checkSum += read1Byte;
Serial.write(read1Byte);
for (uint8_t i = 1; i < 127; i++)
{
Wire.beginTransmission(i);
read1Byte = Wire.endTransmission();
if (read1Byte == 0)
{
Serial.write(i);
}
else
{
Serial.write(0);
}
}
}
else
{
for (uint16_t i = 0; i < eepromReadLength; i++)
{
read1Byte = EEPROM.read(eepromStartIndex + i);
checkSum += read1Byte;
Serial.write(read1Byte);
}
}

Serial.write(checkSum);
Serial.write(ACK);
}
Expand Down
45 changes: 11 additions & 34 deletions ubitx_20/cw_autokey.ino
Original file line number Diff line number Diff line change
Expand Up @@ -235,30 +235,6 @@ void sendCWChar(char cwKeyChar)
}
}

/*
void sendAutoCW(int cwSendLength, char *sendString)
{
byte i;
if (!inTx){
keyDown = 0;
cwTimeout = millis() + cwDelayTime * 10;
startTx(TX_CW, 0); //disable updateDisplay Command for reduce latency time
updateDisplay();
delay_background(delayBeforeCWStartTime * 2, 2);
}
for (i = 0; i < cwSendLength; i++)
{
sendCWChar(sendString[i]);
if (i != cwSendLength -1) delay_background(cwSpeed * 3, 3);
}
delay_background(cwDelayTime * 10, 2);
stopTx();
}
*/
byte isNeedScroll = 0;
unsigned long scrollDispayTime = 0;
#define scrollSpeed 500
Expand Down Expand Up @@ -296,18 +272,19 @@ void controlAutoCW(){
{
displayScrolStep = 0;
}

printLineFromEEPRom(0, 2, cwStartIndex + displayScrolStep + CW_DATA_OFSTADJ, cwEndIndex + CW_DATA_OFSTADJ, 0);

//byte diplayAutoCWLine = 0;
//if ((displayOption1 & 0x01) == 0x01)
// diplayAutoCWLine = 1;

Display_AutoKeyTextIndex(selectedCWTextIndex);
//lcd.setCursor(0, diplayAutoCWLine);
//lcd.write(byteToChar(selectedCWTextIndex));
//lcd.write(':');
#ifdef USE_SW_SERIAL
//Not need Scroll
//Display_AutoKeyTextIndex(selectedCWTextIndex);
SendCommand1Num('w', selectedCWTextIndex); //Index
SendEEPromData('a', cwStartIndex + CW_DATA_OFSTADJ, cwEndIndex + CW_DATA_OFSTADJ, 0) ; //Data
SendCommand1Num('y', 1); //Send YN
isNeedScroll = 0;
#else
printLineFromEEPRom(0, 2, cwStartIndex + displayScrolStep + CW_DATA_OFSTADJ, cwEndIndex + CW_DATA_OFSTADJ, 0);
isNeedScroll = (cwEndIndex - cwStartIndex) > 14 ? 1 : 0;
Display_AutoKeyTextIndex(selectedCWTextIndex);
#endif
scrollDispayTime = millis() + scrollSpeed;
beforeCWTextIndex = selectedCWTextIndex;
}
Expand Down
Loading

0 comments on commit 948267b

Please sign in to comment.