2019-02-15 05:32:07 -05:00
|
|
|
#include "ubitx.h"
|
2017-12-06 23:48:43 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This procedure is only for those who have a signal generator/transceiver tuned to exactly 7.150 and a dummy load
|
|
|
|
*/
|
|
|
|
|
|
|
|
void btnWaitForClick(){
|
|
|
|
while(!btnDown())
|
|
|
|
delay(50);
|
|
|
|
while(btnDown())
|
|
|
|
delay(50);
|
|
|
|
delay(50);
|
|
|
|
}
|
|
|
|
|
|
|
|
void factory_alignment(){
|
|
|
|
|
|
|
|
factoryCalibration(1);
|
2018-01-29 04:38:48 -05:00
|
|
|
line2DisplayStatus = 1;
|
2017-12-06 23:48:43 -05:00
|
|
|
|
|
|
|
if (calibration == 0){
|
|
|
|
printLine2("Setup Aborted");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
//move it away to 7.160 for an LSB signal
|
|
|
|
setFrequency(7160000l);
|
|
|
|
updateDisplay();
|
|
|
|
printLine2("#2 BFO");
|
|
|
|
delay(1000);
|
|
|
|
|
2019-02-15 05:32:07 -05:00
|
|
|
#if UBITX_BOARD_VERSION == 5
|
|
|
|
usbCarrier = 11053000l;
|
|
|
|
menuSetupCarrier(1);
|
|
|
|
if (usbCarrier == 11053000l){
|
|
|
|
printLine2("Setup Aborted");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
#else
|
2017-12-06 23:48:43 -05:00
|
|
|
usbCarrier = 11994999l;
|
|
|
|
menuSetupCarrier(1);
|
|
|
|
if (usbCarrier == 11994999l){
|
|
|
|
printLine2("Setup Aborted");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2019-02-15 05:32:07 -05:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2017-12-06 23:48:43 -05:00
|
|
|
|
|
|
|
printLine2("#3:Test 3.5MHz");
|
2018-01-29 23:20:52 -05:00
|
|
|
cwMode = 0;
|
2017-12-06 23:48:43 -05:00
|
|
|
isUSB = false;
|
|
|
|
setFrequency(3500000l);
|
|
|
|
updateDisplay();
|
|
|
|
|
|
|
|
while (!btnDown()){
|
|
|
|
checkPTT();
|
|
|
|
delay(100);
|
|
|
|
}
|
|
|
|
|
|
|
|
btnWaitForClick();
|
|
|
|
printLine2("#4:Test 7MHz");
|
|
|
|
|
|
|
|
setFrequency(7150000l);
|
|
|
|
updateDisplay();
|
|
|
|
while (!btnDown()){
|
|
|
|
checkPTT();
|
|
|
|
delay(100);
|
|
|
|
}
|
|
|
|
|
|
|
|
btnWaitForClick();
|
|
|
|
printLine2("#5:Test 14MHz");
|
|
|
|
|
2018-01-29 23:20:52 -05:00
|
|
|
cwMode = 0;
|
2017-12-06 23:48:43 -05:00
|
|
|
isUSB = true;
|
|
|
|
setFrequency(14000000l);
|
|
|
|
updateDisplay();
|
|
|
|
while (!btnDown()){
|
|
|
|
checkPTT();
|
|
|
|
delay(100);
|
|
|
|
}
|
|
|
|
|
|
|
|
btnWaitForClick();
|
|
|
|
printLine2("#6:Test 28MHz");
|
|
|
|
|
|
|
|
setFrequency(28000000l);
|
|
|
|
updateDisplay();
|
|
|
|
while (!btnDown()){
|
|
|
|
checkPTT();
|
|
|
|
delay(100);
|
|
|
|
}
|
|
|
|
|
|
|
|
printLine2("Alignment done");
|
|
|
|
delay(1000);
|
|
|
|
|
2018-01-29 23:20:52 -05:00
|
|
|
cwMode = 0;
|
2017-12-06 23:48:43 -05:00
|
|
|
isUSB = false;
|
|
|
|
setFrequency(7150000l);
|
|
|
|
updateDisplay();
|
|
|
|
|
|
|
|
}
|