Compare commits

..

2 Commits

Author SHA1 Message Date
phdlee
14888bb7d7 change channel name display code 2018-02-05 16:46:37 +09:00
phdlee
57cd385b8a add vfo to channel, channel to vfo 2018-02-05 15:07:25 +09:00
3 changed files with 166 additions and 57 deletions

View File

@@ -1,14 +1,19 @@
#IMPORTANT INFORMATION
----------------------------------------------------------------------------
- 0.33 Version Test only download. almost complete
- Beta 0.26 and Beta 0.261, Beta 0.262,0.27 is complete test, 0.28 is tested.
- 0.31 is tested but has not critical bug
- You can download and use it (Release section).
- Beta 0.26 and Beta 0.261, Beta 0.262, Beta 0.27 is complete test
- You can download and use it.
#NOTICE
----------------------------------------------------------------------------
I received uBITX a month ago and found that many features are required, and began coding with the idea of implementing minimal functionality as a general hf transceiver rather than an experimental device.
- fixed bugs...
- Diallock for uBITX's sensitive encoders
- built in softare Memory keyer and cw options control for CW communication
- Implementation of CAT communication protocol for Digital Communication (as FT8, JT65, etc)
- Delay Options for external Linear.
- and more...
Most of the basic functions of the HF transceiver I thought were implemented.
The minimum basic specification for uBITX to operate as a radio, I think it is finished.
So I will release the 0.27 version and if I do not see the bug anymore, I will try to change the version name to 1.0.
@@ -41,41 +46,6 @@ Prepared or finished tasks for the next version
----------------------------------------------------------------------------
## REVISION RECORD
0.33
- Added CWL, CWU Mode, (dont complete test yet)
- fixed VFO changed bug.
- Added Additional BFO for CWL, CWL
- Added IF Shift
- Change confirmation key PTT -> function key (not critical menus)
- Change CW Key Select type, (toggle -> select by dial)
0.32
- Added function Scroll Frequencty on upper line
- Added Example code for Draw meter and remarked (you can see and use this code in source codes)
- Added Split function, just toggle VFOs when TX/RX
0.31
- Fixed CW ADC Range error
- Display Message on Upper Line (anothor VFO Frequency, Tune Step, Selected Key Type)
0.30
- implemented the function to monitor the value of all analog inputs. This allows you to monitor the status of the CW keys connected to your uBITX.
- possible to set the ADC range for CW Keying. If no setting is made, it will have the same range as the original code. If you set the CW Keying ADC Values using uBITX Manager 0.3, you can reduce the key error.
- Added the function to select Straight Key, IAMBICA, IAMBICB key from the menu.
- default Band select is Ham Band mode, if you want common type, long press function key at band select menu, uBITX Manager can be used to modify frequencies to suit your country.
0.29
- Remove the use of initialization values in BFO settings - using crruent value, if factory reset
- Select Tune Step, default 0, 20, 50, 100, 200, Use the uBITX Manager to set the steps value you want. You can select Step by pressing and holding the Function Key (1sec ~ 2sec).
- Modify Dial Lock Function, Press the Function key for more than 3 seconds to toggle dial lock.
- created a new frequency tune method. remove original source codes, Threshold has been applied to reduce malfunction. checked the continuity of the user operating to make natural tune possible.
- stabilize and remove many warning messages - by Pullrequest and merge
- Changed cw keying method. removed the original code and applied Ron's code and Improved compatibility with original hardware and CAT commnication. It can be used without modification of hardware.
0.28
- Fixed CAT problem with hamlib on Linux
- restore Protocol autorecovery logic
0.27
(First alpha test version, This will be renamed to the major version 1.0)
- Dual VFO Dial Lock (vfoA Dial lock)

View File

@@ -180,6 +180,10 @@ int count = 0; //to generally count ticks, loops, etc
#define DISPLAY_OPTION1 361 //Display Option1
#define DISPLAY_OPTION2 362 //Display Option2
#define CHANNEL_FREQ 630 //Channel 1 ~ 20, 1 Channel = 4 bytes
#define CHANNEL_DESC 710 //Channel 1 ~ 20, 1 Channel = 4 bytes
#define RESERVE3 770 //Reserve3 between Channel and Firmware id check
//Check Firmware type and version
#define FIRMWAR_ID_ADDR 776 //776 : 0x59, 777 :0x58, 778 : 0x68 : Id Number, if not found id, erase eeprom(32~1023) for prevent system error.
#define VERSION_ADDRESS 779 //check Firmware version

View File

@@ -13,6 +13,7 @@
#define printLineF1(x) (printLineF(1, x))
#define printLineF2(x) (printLineF(0, x))
//Current Frequency and mode to active VFO by KD8CEC
void FrequencyToVFO(byte isSaveFreq)
{
//Save Frequency & Mode Information
@@ -34,6 +35,7 @@ void FrequencyToVFO(byte isSaveFreq)
}
}
//Commonly called functions when exiting menus by KD8CEC
void menuClearExit(int delayTime)
{
if (delayTime > 0)
@@ -43,7 +45,7 @@ void menuClearExit(int delayTime)
menuOn = 0;
}
//Ham band move by KD8CEC
//Ham band or general band movement by KD8CEC
void menuBand(int btn){
int knob = 0;
int stepChangeCount = 0;
@@ -198,6 +200,7 @@ void byteWithFreqToMode(byte modeValue){
}
*/
//IF Shift function, BFO Change like RIT, by KD8CEC
void menuIFSSetup(int btn){
int knob = 0;
char needApplyChangeValue = 1;
@@ -261,6 +264,7 @@ void menuIFSSetup(int btn){
}
}
//Functions for CWL and CWU by KD8CEC
void menuSelectMode(int btn){
int knob = 0;
int selectModeType = 0;
@@ -351,6 +355,133 @@ void menuSelectMode(int btn){
}
}
//Memory to VFO, VFO to Memory by KD8CEC
//select between MtoV and VtoM by isMemoryToVfo
void menuCHMemory(int btn, byte isMemoryToVfo){
int knob = 0;
int selectChannel = 0;
byte isDisplayInfo = 1;
byte isCancel = 0;
int moveStep = 0;
unsigned long resultFreq, tmpFreq = 0;
byte loadMode = 0;
if (!btn){
if (isMemoryToVfo == 1)
printLine2("Channel To VFO?");
else
printLine2("VFO To Channel?");
}
else {
delay_background(500, 0);
while(!btnDown()){
if (isDisplayInfo == 1) {
//Display Channel info *********************************
memset(c, 0, sizeof(c));
if (selectChannel >= 20 || selectChannel <=-1)
{
strcpy(c, "Exit setup?");
}
else
{
//Read Frequency from eeprom
EEPROM.get(CHANNEL_FREQ + 4 * selectChannel, resultFreq);
loadMode = (byte)(resultFreq >> 29);
resultFreq = resultFreq & 0x1FFFFFFF;
//display channel description
if (selectChannel < 10 && EEPROM.read(CHANNEL_DESC + 6 * selectChannel) == 0x03) { //0x03 is display Chnnel Name
//display Channel Name
for (int i = 0; i < 5; i++)
c[i] = EEPROM.read(CHANNEL_DESC + 6 * selectChannel + i + 1);
c[5] = ':';
}
else {
//Display frequency
//1 LINE : Channel Information : CH00
strcpy(c, "CH");
if (selectChannel < 9)
c[2] = '0';
ltoa(selectChannel + 1, b, 10);
strcat(c, b); //append channel Number;
strcat(c, " :"); //append channel Number;
}
/*
if (selectChannel < 10)
printLineFromEEPRom(0, 4, 0, userCallsignLength -1); //eeprom to lcd use offset (USER_CALLSIGN_DAT)
*/
//display frequency
tmpFreq = resultFreq;
for (int i = 15; i >= 6; i--) {
if (tmpFreq > 0) {
if (i == 12 || i == 8) c[i] = '.';
else {
c[i] = tmpFreq % 10 + 0x30;
tmpFreq /= 10;
}
}
else
c[i] = ' ';
}
}
printLine2(c);
isDisplayInfo = 0;
}
knob = enc_read();
if (knob != 0)
{
moveStep += (knob > 0 ? 1 : -1);
if (moveStep < -3) {
if (selectChannel > -1)
selectChannel--;
isDisplayInfo = 1;
moveStep = 0;
}
else if (moveStep > 3) {
if (selectChannel < 20)
selectChannel++;
isDisplayInfo = 1;
moveStep = 0;
}
}
Check_Cat(0); //To prevent disconnections
} //end of while (knob)
if (selectChannel < 20 && selectChannel >= 0)
{
if (isMemoryToVfo == 1)
{
if (resultFreq > 3000 && resultFreq < 60000000)
setFrequency(resultFreq);
byteToMode(loadMode, 1);
}
else
{
//Save current Frequency to Channel (selectChannel)
EEPROM.put(CHANNEL_FREQ + 4 * selectChannel, (frequency & 0x1FFFFFFF) | (modeToByte() << 29) );
printLine2("Saved Frequency");
}
}
menuClearExit(500);
}
}
//Select CW Key Type by KD8CEC
void menuSetupKeyType(int btn){
int knob = 0;
@@ -568,6 +699,7 @@ void menuRitToggle(int btn){
}
}
//Split communication using VFOA and VFOB by KD8CEC
void menuSplitOnOff(int btn){
if (!btn){
if (splitOn == 0)
@@ -1269,7 +1401,6 @@ void doMenu(){
} //set tune step
//Below codes are origial code with modified by KD8CEC
//Select menu
menuOn = 2;
while (menuOn){
@@ -1277,9 +1408,9 @@ void doMenu(){
btnState = btnDown();
if (i > 0){
if (modeCalibrate && select + i < 200)
if (modeCalibrate && select + i < 220)
select += i;
if (!modeCalibrate && select + i < 100)
if (!modeCalibrate && select + i < 120)
select += i;
}
//if (i < 0 && select - i >= 0)
@@ -1301,32 +1432,36 @@ void doMenu(){
else if (select < 60)
menuCWSpeed(btnState);
else if (select < 70)
menuSplitOnOff(btnState); //SplitOn / off
menuSplitOnOff(btnState); //SplitOn / off
else if (select < 80)
menuCWAutoKey(btnState);
menuCHMemory(btnState, 0); //VFO to Memroy
else if (select < 90)
menuSetup(btnState);
menuCHMemory(btnState, 1); //Memory to VFO
else if (select < 100)
menuCWAutoKey(btnState);
else if (select < 110)
menuSetup(btnState);
else if (select < 120)
menuExit(btnState);
else if (select < 110 && modeCalibrate)
menuSetupCalibration(btnState); //crystal
else if (select < 120 && modeCalibrate)
menuSetupCarrier(btnState); //lsb
else if (select < 130 && modeCalibrate)
menuSetupCWCarrier(btnState); //lsb
menuSetupCalibration(btnState); //crystal
else if (select < 140 && modeCalibrate)
menuSetupCwTone(btnState);
menuSetupCarrier(btnState); //lsb
else if (select < 150 && modeCalibrate)
menuSetupCwDelay(btnState);
menuSetupCWCarrier(btnState); //lsb
else if (select < 160 && modeCalibrate)
menuSetupTXCWInterval(btnState);
menuSetupCwTone(btnState);
else if (select < 170 && modeCalibrate)
menuSetupKeyType(btnState);
menuSetupCwDelay(btnState);
else if (select < 180 && modeCalibrate)
menuADCMonitor(btnState);
menuSetupTXCWInterval(btnState);
else if (select < 190 && modeCalibrate)
menuTxOnOff(btnState, 0x01); //TX OFF / ON
menuSetupKeyType(btnState);
else if (select < 200 && modeCalibrate)
menuADCMonitor(btnState);
else if (select < 210 && modeCalibrate)
menuTxOnOff(btnState, 0x01); //TX OFF / ON
else if (select < 220 && modeCalibrate)
menuExit(btnState);
Check_Cat(0); //To prevent disconnections