v0.29 prepare

This commit is contained in:
phdlee 2018-01-20 22:05:04 +09:00
parent 587d4854c3
commit 2fa8247501
7 changed files with 84 additions and 35 deletions

View File

@ -1,11 +1,67 @@
#IMPORTANT INFORMATION
----------------------------------------------------------------------------
- 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.
Now uBITX is an HF radio and will be able to join you in your happy hams life.
Based on this source, you can use it by adding functions.
I am going to do a new project based on this source, linking with WSPR, WSJT-X and so on.
Of course, this repository is still running. If you have any bugs or ideas, please feel free to email me.
http://www.hamskey.com
DE KD8CEC
kd8cec@gmail.com
#uBITX #uBITX
uBITX firmware, written for the Raduino/Arduino control of uBITX transceivers uBITX firmware, written for the Raduino/Arduino control of uBITX transceivers
This project is based on https://github.com/afarhan/ubitx and all copyright is inherited. This project is based on https://github.com/afarhan/ubitx and all copyright is inherited.
The copyright information of the original is below. The copyright information of the original is below.
KD8CEC KD8CEC
----------------------------------------------------------------------------
Prepared or finished tasks for the next version
- Most of them are implemented and included in version 0.27.
- User Interface on LCD -> Option by user (not need)
- Include WSPR Beacone function - (implement other new repository)
complete experiment
need solve : Big code size (over 100%, then remove some functions for experment)
need replace Si5351 Library (increase risk and need more beta tester)
W3PM sent me his wonderful source - using BITX, GPS
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
## REVISION RECORD ## REVISION RECORD
0.27
(First alpha test version, This will be renamed to the major version 1.0)
- Dual VFO Dial Lock (vfoA Dial lock)
- Support Ham band on uBITX
default Hamband is regeion1 but customize by uBITX Manager Software
- Advanced ham band options (Tx control) for use in all countries. You can adjust it yourself.
- Convenience of band movement
0.26
- only Beta tester released & source code share
- find a bug on none initial eeprom uBITX - Fixed (Check -> initialized & compatible original source code)
- change the version number 0.26 -> 0.27
- Prevent overflow bugs
- bug with linux based Hamlib (raspberry pi), It was perfect for the 0.224 version, but there was a problem for the 0.25 version.
On Windows, ham deluxe, wsjt-x, jt65-hf, and fldigi were successfully run. Problem with Raspberry pi.
0.25 0.25
- Beta Version Released - Beta Version Released
http://www.hamskey.com/2018/01/release-beta-version-of-cat-support.html http://www.hamskey.com/2018/01/release-beta-version-of-cat-support.html

View File

@ -398,7 +398,7 @@ void ReadEEPRom_FT817(byte fromType)
void WriteEEPRom_FT817(byte fromType) void WriteEEPRom_FT817(byte fromType)
{ {
byte temp0 = CAT_BUFF[0]; //byte temp0 = CAT_BUFF[0];
byte temp1 = CAT_BUFF[1]; byte temp1 = CAT_BUFF[1];
CAT_BUFF[0] = 0; CAT_BUFF[0] = 0;

View File

@ -208,10 +208,14 @@ void sendCWChar(char cwKeyChar)
charLength = ((tmpChar >> 6) & 0x03) + 3; charLength = ((tmpChar >> 6) & 0x03) + 3;
for (j = 0; j < charLength; j++) for (j = 0; j < charLength; j++)
sendBuff[j] = (tmpChar << j + 2) & 0x80; sendBuff[j] = (tmpChar << (j + 2)) & 0x80;
break; break;
} }
else
{
charLength = 0;
}
} }
} }
@ -257,7 +261,7 @@ unsigned long scrollDispayTime = 0;
#define scrollSpeed 500 #define scrollSpeed 500
byte displayScrolStep = 0; byte displayScrolStep = 0;
int controlAutoCW(){ void controlAutoCW(){
int knob = 0; int knob = 0;
byte i; byte i;

View File

@ -211,7 +211,7 @@ unsigned long vfoA=7150000L, vfoB=14200000L, sideTone=800, usbCarrier;
unsigned long vfoA_eeprom, vfoB_eeprom; //for protect eeprom life unsigned long vfoA_eeprom, vfoB_eeprom; //for protect eeprom life
unsigned long frequency, ritRxFrequency, ritTxFrequency; //frequency is the current frequency on the dial unsigned long frequency, ritRxFrequency, ritTxFrequency; //frequency is the current frequency on the dial
int cwSpeed = 100; //this is actuall the dot period in milliseconds unsigned int cwSpeed = 100; //this is actuall the dot period in milliseconds
extern int32_t calibration; extern int32_t calibration;
//for store the mode in eeprom //for store the mode in eeprom
@ -320,8 +320,8 @@ void setNextHamBandFreq(unsigned long f, char moveDirection)
loadMode = (byte)(resultFreq >> 30); loadMode = (byte)(resultFreq >> 30);
resultFreq = resultFreq & 0x3FFFFFFF; resultFreq = resultFreq & 0x3FFFFFFF;
if ((resultFreq / 1000) < hamBandRange[findedIndex][0] || (resultFreq / 1000) > hamBandRange[findedIndex][1]) if ((resultFreq / 1000) < hamBandRange[(unsigned char)findedIndex][0] || (resultFreq / 1000) > hamBandRange[(unsigned char)findedIndex][1])
resultFreq = (unsigned long)(hamBandRange[findedIndex][0]) * 1000; resultFreq = (unsigned long)(hamBandRange[(unsigned char)findedIndex][0]) * 1000;
setFrequency(resultFreq); setFrequency(resultFreq);
byteWithFreqToMode(loadMode); byteWithFreqToMode(loadMode);
@ -344,7 +344,7 @@ unsigned long delayBeforeTime = 0;
byte delay_background(unsigned delayTime, byte fromType){ //fromType : 4 autoCWKey -> Check Paddle byte delay_background(unsigned delayTime, byte fromType){ //fromType : 4 autoCWKey -> Check Paddle
delayBeforeTime = millis(); delayBeforeTime = millis();
while (millis() <= delayBeforeTime + delayTime) { while (millis() - delayBeforeTime <= delayTime) {
if (fromType == 4) if (fromType == 4)
{ {
@ -422,8 +422,6 @@ void setTXFilters(unsigned long freq){
*/ */
void setFrequency(unsigned long f){ void setFrequency(unsigned long f){
uint64_t osc_f;
//1 digits discarded //1 digits discarded
f = (f / 50) * 50; f = (f / 50) * 50;
@ -448,8 +446,6 @@ void setFrequency(unsigned long f){
*/ */
void startTx(byte txMode, byte isDisplayUpdate){ void startTx(byte txMode, byte isDisplayUpdate){
unsigned long tx_freq = 0;
//Check Hamband only TX //Not found Hamband index by now frequency //Check Hamband only TX //Not found Hamband index by now frequency
if (tuneTXType >= 100 && getIndexHambanBbyFreq(ritOn ? ritTxFrequency : frequency) == -1) { if (tuneTXType >= 100 && getIndexHambanBbyFreq(ritOn ? ritTxFrequency : frequency) == -1) {
//no message //no message
@ -545,8 +541,6 @@ void checkPTT(){
} }
void checkButton(){ void checkButton(){
int i, t1, t2, knob, new_knob;
//only if the button is pressed //only if the button is pressed
if (!btnDown()) if (!btnDown())
return; return;
@ -575,7 +569,7 @@ void checkButton(){
void doTuning(){ void doTuning(){
int s = 0; int s = 0;
unsigned long prev_freq; unsigned long prev_freq;
int incdecValue = 0; 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)))
@ -610,7 +604,7 @@ void doTuning(){
if (incdecValue > 0 && frequency + incdecValue > HIGHEST_FREQ_DIAL) if (incdecValue > 0 && frequency + incdecValue > HIGHEST_FREQ_DIAL)
frequency = HIGHEST_FREQ_DIAL; frequency = HIGHEST_FREQ_DIAL;
else if (incdecValue < 0 && frequency < -incdecValue + LOWEST_FREQ_DIAL) //for compute and compare based integer type. else if (incdecValue < 0 && frequency < (unsigned long)(-incdecValue + LOWEST_FREQ_DIAL)) //for compute and compare based integer type.
frequency = LOWEST_FREQ_DIAL; frequency = LOWEST_FREQ_DIAL;
else else
frequency += incdecValue; frequency += incdecValue;
@ -630,8 +624,6 @@ void doTuning(){
* RIT only steps back and forth by 100 hz at a time * RIT only steps back and forth by 100 hz at a time
*/ */
void doRIT(){ void doRIT(){
unsigned long newFreq;
int knob = enc_read(); int knob = enc_read();
unsigned long old_freq = frequency; unsigned long old_freq = frequency;

View File

@ -13,7 +13,7 @@
#define printLineF1(x) (printLineF(1, x)) #define printLineF1(x) (printLineF(1, x))
#define printLineF2(x) (printLineF(0, x)) #define printLineF2(x) (printLineF(0, x))
int menuBand(int btn){ void menuBand(int btn){
int knob = 0; int knob = 0;
int stepChangeCount = 0; int stepChangeCount = 0;
byte btnPressCount = 0; byte btnPressCount = 0;
@ -302,7 +302,7 @@ void menuExit(int btn){
} }
} }
int menuCWSpeed(int btn){ void menuCWSpeed(int btn){
int knob = 0; int knob = 0;
int wpm; int wpm;
@ -357,7 +357,7 @@ int menuCWSpeed(int btn){
menuOn = 0; menuOn = 0;
} }
int menuCWAutoKey(int btn){ void menuCWAutoKey(int btn){
if (!btn){ if (!btn){
printLineF2(F("CW AutoKey Mode?")); printLineF2(F("CW AutoKey Mode?"));
return; return;
@ -380,7 +380,7 @@ int menuCWAutoKey(int btn){
menuOn = 0; menuOn = 0;
} }
int menuSetupCwDelay(int btn){ void menuSetupCwDelay(int btn){
int knob = 0; int knob = 0;
int tmpCWDelay = cwDelayTime * 10; int tmpCWDelay = cwDelayTime * 10;
@ -428,7 +428,7 @@ int menuSetupCwDelay(int btn){
menuOn = 0; menuOn = 0;
} }
int menuSetupTXCWInterval(int btn){ void menuSetupTXCWInterval(int btn){
int knob = 0; int knob = 0;
int tmpTXCWInterval = delayBeforeCWStartTime * 2; int tmpTXCWInterval = delayBeforeCWStartTime * 2;
@ -491,10 +491,8 @@ int menuSetupTXCWInterval(int btn){
extern int32_t calibration; extern int32_t calibration;
extern uint32_t si5351bx_vcoa; extern uint32_t si5351bx_vcoa;
int factoryCalibration(int btn){ void factoryCalibration(int btn){
int knob = 0; int knob = 0;
int32_t prev_calibration;
//keep clear of any previous button press //keep clear of any previous button press
while (btnDown()) while (btnDown())
@ -503,10 +501,9 @@ int factoryCalibration(int btn){
if (!btn){ if (!btn){
printLineF2(F("Set Calibration?")); printLineF2(F("Set Calibration?"));
return 0; return;
} }
prev_calibration = calibration;
calibration = 0; calibration = 0;
isUSB = true; isUSB = true;
@ -561,13 +558,13 @@ int factoryCalibration(int btn){
delay(100); delay(100);
} }
int menuSetupCalibration(int btn){ void menuSetupCalibration(int btn){
int knob = 0; int knob = 0;
int32_t prev_calibration; int32_t prev_calibration;
if (!btn){ if (!btn){
printLineF2(F("Set Calibration?")); printLineF2(F("Set Calibration?"));
return 0; return;
} }
printLineF1(F("Set to Zero-beat,")); printLineF1(F("Set to Zero-beat,"));

View File

@ -62,7 +62,7 @@ void i2cWriten(uint8_t reg, uint8_t *vals, uint8_t vcnt) { // write array
void si5351bx_init() { // Call once at power-up, start PLLA void si5351bx_init() { // Call once at power-up, start PLLA
uint8_t reg; uint32_t msxp1; uint32_t msxp1;
Wire.begin(); Wire.begin();
i2cWrite(149, 0); // SpreadSpectrum off i2cWrite(149, 0); // SpreadSpectrum off
i2cWrite(3, si5351bx_clken); // Disable all CLK output drivers i2cWrite(3, si5351bx_clken); // Disable all CLK output drivers

View File

@ -115,7 +115,7 @@ void drawMeter(int8_t needle){
*/ */
// The generic routine to display one line on the LCD // The generic routine to display one line on the LCD
void printLine(char linenmbr, char *c) { void printLine(unsigned char linenmbr, const char *c) {
if (strcmp(c, printBuff[linenmbr])) { // only refresh the display when there was a change if (strcmp(c, printBuff[linenmbr])) { // only refresh the display when there was a change
lcd.setCursor(0, linenmbr); // place the cursor at the beginning of the selected line lcd.setCursor(0, linenmbr); // place the cursor at the beginning of the selected line
lcd.print(c); lcd.print(c);
@ -160,11 +160,11 @@ void printLineFromEEPRom(char linenmbr, char lcdColumn, byte eepromStartIndex, b
} }
// short cut to print to the first line // short cut to print to the first line
void printLine1(char *c){ void printLine1(const char *c){
printLine(1,c); printLine(1,c);
} }
// short cut to print to the first line // short cut to print to the first line
void printLine2(char *c){ void printLine2(const char *c){
printLine(0,c); printLine(0,c);
} }
@ -312,9 +312,9 @@ int enc_read(void) {
byte newState; byte newState;
int enc_speed = 0; int enc_speed = 0;
long stop_by = millis() + 50; unsigned long start_at = millis();
while (millis() < stop_by) { // check if the previous state was stable while (millis() - start_at < 50) { // check if the previous state was stable
newState = enc_state(); // Get current state newState = enc_state(); // Get current state
if (newState != enc_prev_state) if (newState != enc_prev_state)