version0.35
This commit is contained in:
parent
14888bb7d7
commit
3b4aaa664c
@ -109,7 +109,8 @@ void CatSetFreq(byte fromType)
|
|||||||
//#define BCD_LEN 9
|
//#define BCD_LEN 9
|
||||||
//PROTOCOL : 0x03
|
//PROTOCOL : 0x03
|
||||||
//Computer <-(frequency)-> TRCV CAT_BUFF
|
//Computer <-(frequency)-> TRCV CAT_BUFF
|
||||||
void CatGetFreqMode(unsigned long freq, byte fromType)
|
//void CatGetFreqMode(unsigned long freq, byte fromType)
|
||||||
|
void CatGetFreqMode(unsigned long freq) //for remove warning messages
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
byte tmpValue;
|
byte tmpValue;
|
||||||
@ -149,9 +150,14 @@ void CatGetFreqMode(unsigned long freq, byte fromType)
|
|||||||
SendCatData(5);
|
SendCatData(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CatSetSplit(boolean isSplit, byte fromType)
|
//void CatSetSplit(boolean isSplit, byte fromType)
|
||||||
|
void CatSetSplit(boolean isSplit) //for remove warning messages
|
||||||
{
|
{
|
||||||
|
if (isSplit)
|
||||||
|
splitOn = 1;
|
||||||
|
else
|
||||||
|
splitOn = 0;
|
||||||
|
|
||||||
Serial.write(ACK);
|
Serial.write(ACK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -193,7 +199,7 @@ void CatSetPTT(boolean isPTTOn, byte fromType)
|
|||||||
void CatVFOToggle(boolean isSendACK, byte fromType)
|
void CatVFOToggle(boolean isSendACK, byte fromType)
|
||||||
{
|
{
|
||||||
if (fromType != 2 && fromType != 3) {
|
if (fromType != 2 && fromType != 3) {
|
||||||
menuVfoToggle(1, 0);
|
menuVfoToggle(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isSendACK)
|
if (isSendACK)
|
||||||
@ -232,7 +238,8 @@ void CatSetMode(byte tmpMode, byte fromType)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Read EEProm by uBITX Manager Software
|
//Read EEProm by uBITX Manager Software
|
||||||
void ReadEEPRom(byte fromType)
|
//void ReadEEPRom(byte fromType)
|
||||||
|
void ReadEEPRom() //for remove warnings.
|
||||||
{
|
{
|
||||||
//5BYTES
|
//5BYTES
|
||||||
//CAT_BUFF[0] [1] [2] [3] [4] //4 COMMAND
|
//CAT_BUFF[0] [1] [2] [3] [4] //4 COMMAND
|
||||||
@ -255,7 +262,8 @@ void ReadEEPRom(byte fromType)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Write just proecess 1byes
|
//Write just proecess 1byes
|
||||||
void WriteEEPRom(byte fromType)
|
//void WriteEEPRom(byte fromType)
|
||||||
|
void WriteEEPRom(void) //for remove warning
|
||||||
{
|
{
|
||||||
//5BYTES
|
//5BYTES
|
||||||
uint16_t eepromStartIndex = CAT_BUFF[0] + CAT_BUFF[1] * 256;
|
uint16_t eepromStartIndex = CAT_BUFF[0] + CAT_BUFF[1] * 256;
|
||||||
@ -275,7 +283,8 @@ void WriteEEPRom(byte fromType)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReadEEPRom_FT817(byte fromType)
|
//void ReadEEPRom_FT817(byte fromType)
|
||||||
|
void ReadEEPRom_FT817(void) //for remove warnings
|
||||||
{
|
{
|
||||||
byte temp0 = CAT_BUFF[0];
|
byte temp0 = CAT_BUFF[0];
|
||||||
byte temp1 = CAT_BUFF[1];
|
byte temp1 = CAT_BUFF[1];
|
||||||
@ -601,7 +610,8 @@ void WriteEEPRom_FT817(byte fromType)
|
|||||||
Serial.write(ACK);
|
Serial.write(ACK);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CatRxStatus(byte fromType)
|
//void CatRxStatus(byte fromType)
|
||||||
|
void CatRxStatus(void) //for remove warning
|
||||||
{
|
{
|
||||||
byte sMeterValue = 1;
|
byte sMeterValue = 1;
|
||||||
|
|
||||||
@ -621,7 +631,8 @@ void CatRxStatus(byte fromType)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CatTxStatus(byte fromType)
|
//void CatTxStatus(byte fromType)
|
||||||
|
void CatTxStatus(void) //for remove warning
|
||||||
{
|
{
|
||||||
boolean isHighSWR = false;
|
boolean isHighSWR = false;
|
||||||
boolean isSplitOn = false;
|
boolean isSplitOn = false;
|
||||||
@ -722,11 +733,11 @@ void Check_Cat(byte fromType)
|
|||||||
|
|
||||||
case 0x02 : //Split On
|
case 0x02 : //Split On
|
||||||
case 0x82: //Split Off
|
case 0x82: //Split Off
|
||||||
CatSetSplit(CAT_BUFF[4] == 0x02, fromType);
|
CatSetSplit(CAT_BUFF[4] == 0x02);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x03 : //Read Frequency and mode
|
case 0x03 : //Read Frequency and mode
|
||||||
CatGetFreqMode(frequency, fromType);
|
CatGetFreqMode(frequency);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x07 : //Set Operating Mode
|
case 0x07 : //Set Operating Mode
|
||||||
@ -743,24 +754,24 @@ void Check_Cat(byte fromType)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 0xDB: //Read uBITX EEPROM Data
|
case 0xDB: //Read uBITX EEPROM Data
|
||||||
ReadEEPRom(fromType); //Call by uBITX Manager Program
|
ReadEEPRom(); //Call by uBITX Manager Program
|
||||||
break;
|
break;
|
||||||
case 0xBB: //Read FT-817 EEPROM Data (for comfirtable)
|
case 0xBB: //Read FT-817 EEPROM Data (for comfirtable)
|
||||||
ReadEEPRom_FT817(fromType);
|
ReadEEPRom_FT817();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0xDC: //Write uBITX EEPROM Data
|
case 0xDC: //Write uBITX EEPROM Data
|
||||||
WriteEEPRom(fromType); //Call by uBITX Manager Program
|
WriteEEPRom(); //Call by uBITX Manager Program
|
||||||
break;
|
break;
|
||||||
case 0xBC: //Write FT-817 EEPROM Data (for comfirtable)
|
case 0xBC: //Write FT-817 EEPROM Data (for comfirtable)
|
||||||
WriteEEPRom_FT817(fromType);
|
WriteEEPRom_FT817(fromType);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0xE7 : //Read RX Status
|
case 0xE7 : //Read RX Status
|
||||||
CatRxStatus(fromType);
|
CatRxStatus();
|
||||||
break;
|
break;
|
||||||
case 0xF7: //Read TX Status
|
case 0xF7: //Read TX Status
|
||||||
CatTxStatus(fromType);
|
CatTxStatus();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/*
|
/*
|
||||||
|
@ -696,7 +696,6 @@ byte lastMovedirection = 0; //0 : stop, 1 : cw, 2 : ccw
|
|||||||
void doTuningWithThresHold(){
|
void doTuningWithThresHold(){
|
||||||
int s = 0;
|
int s = 0;
|
||||||
unsigned long prev_freq;
|
unsigned long prev_freq;
|
||||||
long incdecValue = 0;
|
|
||||||
|
|
||||||
if ((vfoActive == VFO_A && ((isDialLock & 0x01) == 0x01)) ||
|
if ((vfoActive == VFO_A && ((isDialLock & 0x01) == 0x01)) ||
|
||||||
(vfoActive == VFO_B && ((isDialLock & 0x02) == 0x02)))
|
(vfoActive == VFO_B && ((isDialLock & 0x02) == 0x02)))
|
||||||
|
@ -213,16 +213,18 @@ void updateLine2Buffer(char isDirectCall)
|
|||||||
//meterType : 0 = S.Meter, 1 : P.Meter
|
//meterType : 0 = S.Meter, 1 : P.Meter
|
||||||
void DisplayMeter(byte meterType, byte meterValue, char drawPosition)
|
void DisplayMeter(byte meterType, byte meterValue, char drawPosition)
|
||||||
{
|
{
|
||||||
drawMeter(meterValue); //call original source code
|
if (meterType == 0 || meterType == 1 || meterType == 2)
|
||||||
int lineNumber = 0;
|
{
|
||||||
if ((displayOption1 & 0x01) == 0x01)
|
drawMeter(meterValue); //call original source code
|
||||||
lineNumber = 1;
|
int lineNumber = 0;
|
||||||
|
if ((displayOption1 & 0x01) == 0x01)
|
||||||
|
lineNumber = 1;
|
||||||
|
|
||||||
|
lcd.setCursor(drawPosition, lineNumber);
|
||||||
|
|
||||||
lcd.setCursor(drawPosition, lineNumber);
|
for (int i = 0; i < 6; i++) //meter 5 + +db 1 = 6
|
||||||
|
lcd.write(lcdMeter[i]);
|
||||||
for (int i = 0; i < 6; i++) //meter 5 + +db 1 = 6
|
}
|
||||||
lcd.write(lcdMeter[i]);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
byte testValue = 0;
|
byte testValue = 0;
|
||||||
|
@ -90,13 +90,13 @@ void cwKeyUp(){
|
|||||||
#define PDLSWAP 0x08 // 0 for normal, 1 for swap
|
#define PDLSWAP 0x08 // 0 for normal, 1 for swap
|
||||||
#define IAMBICB 0x10 // 0 for Iambic A, 1 for Iambic B
|
#define IAMBICB 0x10 // 0 for Iambic A, 1 for Iambic B
|
||||||
enum KSTYPE {IDLE, CHK_DIT, CHK_DAH, KEYED_PREP, KEYED, INTER_ELEMENT };
|
enum KSTYPE {IDLE, CHK_DIT, CHK_DAH, KEYED_PREP, KEYED, INTER_ELEMENT };
|
||||||
static long ktimer;
|
static unsigned long ktimer;
|
||||||
unsigned char keyerState = IDLE;
|
unsigned char keyerState = IDLE;
|
||||||
|
|
||||||
//Below is a test to reduce the keying error. do not delete lines
|
//Below is a test to reduce the keying error. do not delete lines
|
||||||
//create by KD8CEC for compatible with new CW Logic
|
//create by KD8CEC for compatible with new CW Logic
|
||||||
char update_PaddleLatch(byte isUpdateKeyState) {
|
char update_PaddleLatch(byte isUpdateKeyState) {
|
||||||
unsigned char tmpKeyerControl;
|
unsigned char tmpKeyerControl = 0;
|
||||||
int paddle = analogRead(ANALOG_KEYER);
|
int paddle = analogRead(ANALOG_KEYER);
|
||||||
|
|
||||||
if (paddle >= cwAdcDashFrom && paddle <= cwAdcDashTo)
|
if (paddle >= cwAdcDashFrom && paddle <= cwAdcDashTo)
|
||||||
@ -126,9 +126,7 @@ char update_PaddleLatch(byte isUpdateKeyState) {
|
|||||||
// modified by KD8CEC
|
// modified by KD8CEC
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
void cwKeyer(void){
|
void cwKeyer(void){
|
||||||
byte paddle;
|
|
||||||
lastPaddle = 0;
|
lastPaddle = 0;
|
||||||
int dot,dash;
|
|
||||||
bool continue_loop = true;
|
bool continue_loop = true;
|
||||||
unsigned tmpKeyControl = 0;
|
unsigned tmpKeyControl = 0;
|
||||||
|
|
||||||
|
@ -362,7 +362,6 @@ void menuCHMemory(int btn, byte isMemoryToVfo){
|
|||||||
int knob = 0;
|
int knob = 0;
|
||||||
int selectChannel = 0;
|
int selectChannel = 0;
|
||||||
byte isDisplayInfo = 1;
|
byte isDisplayInfo = 1;
|
||||||
byte isCancel = 0;
|
|
||||||
int moveStep = 0;
|
int moveStep = 0;
|
||||||
unsigned long resultFreq, tmpFreq = 0;
|
unsigned long resultFreq, tmpFreq = 0;
|
||||||
byte loadMode = 0;
|
byte loadMode = 0;
|
||||||
@ -472,7 +471,7 @@ void menuCHMemory(int btn, byte isMemoryToVfo){
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//Save current Frequency to Channel (selectChannel)
|
//Save current Frequency to Channel (selectChannel)
|
||||||
EEPROM.put(CHANNEL_FREQ + 4 * selectChannel, (frequency & 0x1FFFFFFF) | (modeToByte() << 29) );
|
EEPROM.put(CHANNEL_FREQ + 4 * selectChannel, (frequency & 0x1FFFFFFF) | (((unsigned long)modeToByte()) << 29) );
|
||||||
printLine2("Saved Frequency");
|
printLine2("Saved Frequency");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -629,7 +628,7 @@ void menuADCMonitor(int btn){
|
|||||||
}
|
}
|
||||||
|
|
||||||
//VFO Toggle and save VFO Information, modified by KD8CEC
|
//VFO Toggle and save VFO Information, modified by KD8CEC
|
||||||
void menuVfoToggle(int btn, char isUseDelayTime)
|
void menuVfoToggle(int btn)
|
||||||
{
|
{
|
||||||
if (!btn){
|
if (!btn){
|
||||||
if (vfoActive == VFO_A)
|
if (vfoActive == VFO_A)
|
||||||
@ -1422,7 +1421,7 @@ void doMenu(){
|
|||||||
else if (select < 10)
|
else if (select < 10)
|
||||||
menuBand(btnState);
|
menuBand(btnState);
|
||||||
else if (select < 20)
|
else if (select < 20)
|
||||||
menuVfoToggle(btnState, 1);
|
menuVfoToggle(btnState);
|
||||||
else if (select < 30)
|
else if (select < 30)
|
||||||
menuSelectMode(btnState);
|
menuSelectMode(btnState);
|
||||||
else if (select < 40)
|
else if (select < 40)
|
||||||
|
@ -99,8 +99,6 @@ void initMeter(){
|
|||||||
//0 ~ 25 : 30 over : + 10
|
//0 ~ 25 : 30 over : + 10
|
||||||
void drawMeter(int needle) {
|
void drawMeter(int needle) {
|
||||||
//5Char + O over
|
//5Char + O over
|
||||||
int drawCharLength = needle / 5;
|
|
||||||
int drawCharLengthLast = needle % 5;
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 5; i++) {
|
for (i = 0; i < 5; i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user