bug fix 0.26_2

This commit is contained in:
phdlee 2018-01-13 19:42:39 +09:00
parent b9b8f4b46f
commit 924db221f4
2 changed files with 21 additions and 57 deletions

View File

@ -327,7 +327,7 @@ void setNextHamBandFreq(unsigned long f, char moveDirection)
byteWithFreqToMode(loadMode); byteWithFreqToMode(loadMode);
} }
void saveBandFreqByIndex(unsigned long f, unsigned long mode, byte bandIndex) { void saveBandFreqByIndex(unsigned long f, unsigned long mode, char bandIndex) {
if (bandIndex >= 0) if (bandIndex >= 0)
EEPROM.put(HAM_BAND_FREQS + 4 * bandIndex, (f & 0x3FFFFFFF) | (mode << 30) ); EEPROM.put(HAM_BAND_FREQS + 4 * bandIndex, (f & 0x3FFFFFFF) | (mode << 30) );
} }
@ -739,7 +739,7 @@ void initSettings(){
EEPROM.get(TX_TUNE_TYPE, tuneTXType); EEPROM.get(TX_TUNE_TYPE, tuneTXType);
if ((3 < tuneTXType && 100 < tuneTXType) || 103 < tuneTXType || useHamBandCount < 1) if ((3 < tuneTXType && tuneTXType < 100) || 103 < tuneTXType || useHamBandCount < 1)
tuneTXType = 0; tuneTXType = 0;
//Read band Information //Read band Information
@ -843,37 +843,23 @@ void setup()
*/ */
//Serial.begin(9600); //Serial.begin(9600);
delay(100);
lcd.begin(16, 2); lcd.begin(16, 2);
printLineF(1, F("CECBT v0.27"));
//remark for John test
Init_Cat(38400, SERIAL_8N1); Init_Cat(38400, SERIAL_8N1);
initMeter(); //not used in this build initMeter(); //not used in this build
initSettings(); initSettings();
printLineF(1, F("CECBT v0.263")); if (userCallsignLength > 0 && ((userCallsignLength & 0x80) == 0x80)) {
if (userCallsignLength > 0 && ((userCallsignLength & 0x80) == 0x80))
{
userCallsignLength = userCallsignLength & 0x7F; userCallsignLength = userCallsignLength & 0x7F;
printLineFromEEPRom(0, 0, 0, userCallsignLength -1); //eeprom to lcd use offset (USER_CALLSIGN_DAT) printLineFromEEPRom(0, 0, 0, userCallsignLength -1); //eeprom to lcd use offset (USER_CALLSIGN_DAT)
delay(500);
} }
else else {
{
printLineF(0, F("uBITX v0.20")); printLineF(0, F("uBITX v0.20"));
delay(500); //< -- replace from delay_background(500, 0) //johns bug report / on raspberry
printLine2("");
}
//replace above to below (before initSettings(); position)
/*
printLine2("CECBT v0.27");
printLine1("uBITX v0.20");
delay(500); delay(500);
printLine2(""); printLine2("");
}
Init_Cat(9600, SERIAL_8N1);
initMeter(); //not used in this build
initSettings();
*/
initPorts(); initPorts();
initOscillators(); initOscillators();

View File

@ -38,6 +38,7 @@ int menuBand(int btn){
tuneTXType = 2; tuneTXType = 2;
//if empty band Information, auto insert default region 1 frequency range //if empty band Information, auto insert default region 1 frequency range
//This part is made temporary for people who have difficulty setting up, so can remove it when you run out of memory. //This part is made temporary for people who have difficulty setting up, so can remove it when you run out of memory.
if (useHamBandCount < 1) {
useHamBandCount = 10; useHamBandCount = 10;
hamBandRange[0][0] = 1810; hamBandRange[0][1] = 2000; hamBandRange[0][0] = 1810; hamBandRange[0][1] = 2000;
hamBandRange[1][0] = 3500; hamBandRange[1][1] = 3800; hamBandRange[1][0] = 3500; hamBandRange[1][1] = 3800;
@ -49,6 +50,7 @@ int menuBand(int btn){
hamBandRange[7][0] = 21000; hamBandRange[7][1] = 21450; hamBandRange[7][0] = 21000; hamBandRange[7][1] = 21450;
hamBandRange[8][0] = 24890; hamBandRange[8][1] = 24990; hamBandRange[8][0] = 24890; hamBandRange[8][1] = 24990;
hamBandRange[9][0] = 28000; hamBandRange[9][1] = 29700; hamBandRange[9][0] = 28000; hamBandRange[9][1] = 29700;
}
printLineF2(F("Ham band mode")); printLineF2(F("Ham band mode"));
} }
delay_background(1000, 0); delay_background(1000, 0);
@ -57,7 +59,7 @@ int menuBand(int btn){
} }
} }
byte currentBandIndex = -1; char currentBandIndex = -1;
//Save Band Information //Save Band Information
if (tuneTXType == 2 || tuneTXType == 3 || tuneTXType == 102 || tuneTXType == 103) { //only ham band move if (tuneTXType == 2 || tuneTXType == 3 || tuneTXType == 102 || tuneTXType == 103) { //only ham band move
//Get Now Band Index //Get Now Band Index
@ -263,30 +265,6 @@ void menuTxOnOff(int btn, byte optionType){
} }
} }
/*
void menuSplitOnOff(int btn){
if (!btn){
if ((isTxType & 0x02) == 0)
printLineF2(F("Split OFF?"));
else
printLineF2(F("Split ON?"));
}
else {
if ((isTxType & 0x02) == 0){
isTxType |= 0x02;
printLineF2(F("Split OFF!"));
}
else {
isTxType &= ~(0x02);
printLineF2(F("Split ON!"));
}
delay_background(500, 0);
printLine2ClearAndUpdate();
menuOn = 0;
}
}
*/
/** /**
* The calibration routines are not normally shown in the menu as they are rarely used * The calibration routines are not normally shown in the menu as they are rarely used
* They can be enabled by choosing this menu option * They can be enabled by choosing this menu option