Version text added

pull/139/head
erikkaashoek 1 year ago
parent 22a61bd2e3
commit 4ecd384698

@ -1235,34 +1235,34 @@ config_t config = {
#ifdef TINYSA4
const freq_t v5_2_correction_frequency[CORRECTION_SIZE][CORRECTION_POINTS]=
{
/* low */ { 10000, 40000, 80000, 400000, 700000, 3000000, 30000000, 130000000, 170000000, 220000000, 420000000, 460000000, 750000000, 820000000, 860000000, 870000000, 880000000, 890000000, 900000000, 900000000},
/* low lna */ { 20000, 50000, 100000, 500000, 700000, 1000000, 7000000, 30000000, 220000000, 360000000, 420000000, 630000000, 750000000, 810000000, 850000000, 860000000, 870000000, 880000000, 890000000, 900000000},
/* ultra */ { 30000000, 700000000, 4110000000, 4740000000, 4890000000, 5010000000, 5110000000, 5440000000, 5780000000, 6430000000, 6590000000, 6800000000, 7350000000, 7350000000, 7350000000, 7350000000, 7350000000, 7350000000, 7350000000, 7350000000},
/* ultra lna */ { 30000000, 700000000, 2670000000, 4040000000, 4390000000, 4770000000, 5240000000, 5470000000, 5880000000, 6020000000, 6200000000, 6410000000, 7100000000, 7350000000, 7350000000, 7350000000, 7350000000, 7350000000, 7350000000, 7350000000},
/* direct */ { 140000000, 180000000, 280000000, 420000000, 560000000, 830000000, 920000000, 1000000000, 1130000000, 1130000000, 1130000000, 1130000000, 1130000000, 1130000000, 1130000000, 1130000000, 1130000000, 1130000000, 1130000000, 1130000000},
/* direct lna */ { 140000000, 170000000, 180000000, 280000000, 330000000, 440000000, 560000000, 830000000, 900000000, 960000000, 1040000000, 1130000000, 1130000000, 1130000000, 1130000000, 1130000000, 1130000000, 1130000000, 1130000000, 1130000000},
/* harm */ { 30000000, 5000000000, 5070000000, 5140000000, 5480000000, 6110000000, 6570000000, 7080000000, 7270000000, 7920000000, 8380000000, 8700000000, 8920000000, 9010000000, 9260000000, 10000000000, 10000000000, 10000000000, 10000000000, 10000000000},
/* harm lna */ { 30000000, 5000000000, 5270000000, 5540000000, 6170000000, 6770000000, 7370000000, 7920000000, 8610000000, 9380000000, 10000000000, 10000000000, 10000000000, 10000000000, 10000000000, 10000000000, 10000000000, 10000000000, 10000000000, 10000000000},
/* out */ { 100000, 300000, 700000, 5000000, 30000000, 90000000, 210000000, 550000000, 790000000, 870000000, 900000000, 900000000, 900000000, 900000000, 900000000, 900000000, 900000000, 900000000, 900000000, 900000000},
/* direct */ { 823000000, 1140000000, 1140000000, 1140000000, 1140000000, 1140000000, 1140000000, 1140000000, 1140000000, 1140000000, 1140000000, 1140000000, 1140000000, 1140000000, 1140000000, 1140000000, 1140000000, 1140000000, 1140000000, 1140000000},
/* adf */ { 740000000, 1120000000, 1310000000, 1430000000, 1700000000, 2100000000, 2200000000, 2300000000, 3100000000, 4000000000, 4200000000, 4500000000, 4600000000, 4900000000, 5300000000, 5600000000, 6000000000, 6400000000, 6400000000, 6400000000},
/* ultra */ { 10000, 100000, 600000, 4000000, 20000000, 280000000, 750000000, 1230000000, 2900000000, 3400000000, 4100000000, 4500000000, 5300000000, 6000000000, 6600000000, 7400000000, 7400000000, 7400000000, 7400000000, 7400000000}
/* low */ { 10000, 20000, 60000, 200000, 400000, 600000, 700000, 1000000, 3000000, 30000000, 80000000, 190000000, 240000000, 440000000, 610000000, 640000000, 770000000, 850000000, 880000000, 900000000},
/* low lna */ { 10000, 20000, 40000, 100000, 200000, 400000, 600000, 700000, 1000000, 4000000, 10000000, 30000000, 90000000, 130000000, 220000000, 310000000, 590000000, 700000000, 840000000, 900000000},
/* ultra */ { 30000000, 700000000, 1030000000, 1560000000, 2250000000, 3590000000, 4070000000, 4340000000, 4630000000, 4830000000, 4870000000, 5370000000, 5670000000, 6220000000, 6430000000, 6550000000, 6600000000, 6800000000, 7200000000, 7350000000},
/* ultra lna */ { 30000000, 700000000, 1090000000, 1540000000, 1870000000, 2690000000, 3110000000, 3520000000, 4000000000, 4170000000, 4360000000, 4810000000, 5360000000, 5620000000, 5970000000, 6220000000, 6440000000, 6710000000, 7010000000, 7350000000},
/* direct */ { 140000000, 150000000, 160000000, 180000000, 280000000, 330000000, 410000000, 500000000, 540000000, 560000000, 830000000, 840000000, 880000000, 910000000, 950000000, 970000000, 990000000, 1050000000, 1110000000, 1130000000},
/* direct lna */ { 140000000, 160000000, 180000000, 280000000, 370000000, 390000000, 430000000, 460000000, 510000000, 530000000, 560000000, 830000000, 840000000, 860000000, 900000000, 940000000, 1000000000, 1050000000, 1070000000, 1130000000},
/* harm */ { 30000000, 5000000000, 5200000000, 5540000000, 6570000000, 7200000000, 7740000000, 8110000000, 8350000000, 8460000000, 8590000000, 8910000000, 9010000000, 9300000000, 9740000000, 9800000000, 9970000000, 10560000000, 10910000000, 11000000000},
/* harm lna */ { 30000000, 5000000000, 5200000000, 5360000000, 5560000000, 5800000000, 6190000000, 6460000000, 6720000000, 7440000000, 7880000000, 8490000000, 8750000000, 9150000000, 9240000000, 10110000000, 10210000000, 10510000000, 10910000000, 11000000000},
/* out */ { 10000, 20000, 60000, 200000, 400000, 600000, 2000000, 5000000, 30000000, 120000000, 200000000, 320000000, 400000000, 450000000, 500000000, 570000000, 700000000, 780000000, 870000000, 900000000},
/* direct */ { 823000000, 930000000, 940000000, 950000000, 1070000000, 1140000000, 1140000000, 1140000000, 1140000000, 1140000000, 1140000000, 1140000000, 1140000000, 1140000000, 1140000000, 1140000000, 1140000000, 1140000000, 1140000000, 1140000000},
/* adf */ { 740000000, 770000000, 820000000, 880000000, 940000000, 1020000000, 1070000000, 1100000000, 1140000000, 1210000000, 1230000000, 1310000000, 1340000000, 1460000000, 1620000000, 1660000000, 1700000000, 1750000000, 1780000000, 2000000000},
/* ultra */ { 10000, 30000, 80000, 200000, 400000, 2000000, 5000000, 260000000, 700000000, 1050000000, 1580000000, 2800000000, 2810000000, 3880000000, 4980000000, 5630000000, 6480000000, 6750000000, 7000000000, 7500000000}
};
const float v5_2_correction_value[CORRECTION_SIZE][CORRECTION_POINTS]=
{
/* low */ { 18.66, 14.1, 11.7, 9.27, 1.91, -0.84, -0.9, -0.9, 0.15, 0.25, -0.2, -0.9, -0.5, -0.5, 0.5, 0.5, 0.8, 1, 1.5, 1.5},
/* low lna */ { 15.48, 11.15, 9.23, 6.73, 1.23, -0.6, -2, -1.47, -0.05, 0.5, -0.2, -1, -0.5, -0.4, -0.06, 0.4, 0.44, 0.84, 1, 1},
/* ultra */ { 0.001, -0.07, 4.68, 7, 7.13, 5.96, 7.05, 6.59, 8.94, 11.14, 12.1, 14.68, 26, 26, 26, 26, 26, 26, 26, 26},
/* ultra lna */ { 0.0001, 0.81, 2.12, 6.26, 1.55, 9.08, 10.49, 9.2, 10.86, 11.01, 9.71, 11.71, 21.05, 28.26, 28.26, 28.26, 28.26, 28.26, 28.26, 28.26},
/* direct */ { 55.9, 47.83, 35.46, 24.2, 15.84, 2.47, -0.03, -0.2, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5},
/* direct lna */ { 55, 49.54, 48, 35.46, 31, 22.6, 15.49, 2.49, 0.001, -0.5, -0.5, 0.47, 0.47, 0.47, 0.47, 0.47, 0.47, 0.47, 0.47, 0.47},
/* harm */ { 0.001, 15.49, 15.08, 14.77, 13.6, 14.37, 16.33, 23.47, 25.08, 25.87, 30.1, 34.5, 39.51, 40.5, 40.14, 42.77, 42.77, 42.77, 42.77, 42.77},
/* harm lna */ { 0.001, 20.53, 20.89, 15.67, 13.32, 22.15, 27.77, 28.3, 34.67, 49.83, 52.42, 52.42, 52.42, 52.42, 52.42, 52.42, 52.42, 52.42, 52.42, 52.42},
/* out */ { 0.77, -2.79, -3.73, -5.29, -5.74, -5.7, -4.08, -5.35, -4.77, -3.74, -2.53, -2.53, -2.53, -2.53, -2.53, -2.53, -2.53, -2.53, -2.53, -2.53},
/* direct */ { -3.8, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, 0.31},
/* adf */ { -4.8, 3.34, -6, -8.6, -10.7, -7.33, -7.73, -8.38, -4.39, -2.64, -0.58, 6.76, 6.76, 3.53, 3.93, 2.21, 2.43, 3.31, 3.31, 3.31},
/* ultra */ { 5.72, 0.57, -3.73, -5.19, -5.49, -4.51, -5.35, -3.81, -2.44, -0.59, 0.12, 4.84, 2.21, 3.5, 6.29, 18.3, 18.3, 18.3, 18.3, 18.3},
/* low */ { 19.61, 16.55, 12.96, 10.22, 10.86, 7.67, 3.13, 1.63, 0.44, 0.00001, 0.06, 1.46, 1.76, 0.66, 0.2, 0.64, 0.87, 1.95, 2.46, 3.63},
/* low lna */ { 23.82, 16.13, 13.04, 10.6, 9.61, 10.61, 7.5, 3.57, 2.09, 0.38, 0.12, 0.00001, 0.73, 1.95, 1.68, 2.08, 1.12, 1.11, 1.97, 4.08},
/* ultra */ { 0.00001, 0.13, 1.41, 1.31, 2.52, 6.04, 6.36, 7.21, 9.03, 9.57, 10.08, 9.18, 9.19, 12.3, 12.31, 12.88, 13.29, 15.67, 22.99, 24.23},
/* ultra lna */ { 0.000001, 1.39, 1.22, 1.63, 2.85, 3.49, 5.74, 6.07, 7.87, 7.31, 3.22, 12.26, 12.7, 11.24, 12.81, 11.81, 13.31, 17.77, 20.25, 26.37},
/* direct */ { 55.3, 52.08, 51.43, 47.73, 35.53, 30.88, 24.63, 18.21, 15.87, 15.65, 2.63, 2.63, 1.42, 0.77, 0.79, 0.33, 0.26, 0.00001, 0.3, 0.66},
/* direct lna */ { 55.46, 51.53, 48.25, 35.96, 27.69, 26.58, 23.27, 21.52, 17.61, 16.3, 15.38, 2.61, 2.61, 1.7, 1.25, 0.27, 0.02, 0.00001, 0.4, 0.74},
/* harm */ { 0.00001, 14.37, 13.24, 12.6, 16.02, 23.87, 23.67, 26.52, 28.25, 29.67, 31.11, 38.42, 39.13, 37.82, 39.74, 40.43, 42.3, 55.01, 51.96, 52.42},
/* harm lna */ { 0.00001, 21.18, 21.2, 20.68, 17.77, 16.5, 15.35, 18.34, 23.3, 29.41, 28.82, 34.25, 37.63, 47.03, 48.12, 52.68, 54.27, 63.74, 57.34, 57.58},
/* out */ { 8.37, 5.53, 2.3, -1.37, -3.14, -3.43, -5.06, -5.59, -5.95, -5.59, -4.55, -5.06, -5.06, -5.59, -5.35, -5.78, -5.12, -5.17, -3.81, -2.37},
/* direct */ { -3.9, -2.73, -2.55, -2.5, -1.04, -0.03, -0.03, -0.03, -0.03, -0.03, -0.03, -0.03, -0.03, -0.03, -0.03, -0.03, -0.03, -0.03, -0.03, -0.03},
/* adf */ { -3.25, -2.51, -1.77, -1.34, -0.16, 2.8, 5.37, 5.23, 3.76, -0.93, -1.98, -4.71, -5.41, -7.41, -8.63, -8.53, -8.28, -7.66, -7.56, -5.78},
/* ultra */ { 8.24, 4.14, 1.31, -1.56, -3.29, -5.09, -5.59, -4.86, -5.78, -4.61, -4.67, -2.02, -2.93, -0.36, 2.78, 1.84, 4.97, 8.07, 11.98, 11.47},
};
const float v5_2_harmonic_lna_level_offset = 0; // should be in correction table now -7; // Depends on where the transition to harmonic is done!!!!!! TODO find best frequency to transition to harmonic
@ -2198,20 +2198,22 @@ typedef struct version_t {
const char *text;
const uint8_t hwid;
const uint8_t hw_if;
const char *hw_text;
} version_t;
#define MAX_VERSION_TEXT 5
const version_t hw_version_text[MAX_VERSION_TEXT] =
{
{ 165, 179, "V0.4.5.1", 1, 0},
{ 180, 195, "V0.4.5.1.1", 2, 0},
{ 250, 350, "V0.4.6", 3, 1},
{ 2030, 2040, "V0.5.2", 102, 1},
{ 2240, 2260, "V0.5.4", 103, 1},
{ 165, 179, "V0.4.5.1", 1, 0, "ZS405"},
{ 180, 195, "V0.4.5.1.1", 2, 0, "ZS405"},
{ 250, 350, "V0.4.6", 3, 1, "+ ZS406"},
{ 2030, 2040, "V0.5.2", 102, 1, "+ ZS407"},
{ 2240, 2260, "V0.5.4", 103, 1, "+ ZS407"},
};
uint16_t hwid = 0;
uint16_t hw_if = 0;
char *hw_text = "";
const char *get_hw_version_text(void)
{
@ -2220,6 +2222,7 @@ const char *get_hw_version_text(void)
if (hw_version_text[i].min_adc <= v && v <= hw_version_text[i].max_adc) {
hwid = hw_version_text[i].hwid;
hw_if = hw_version_text[i].hw_if;
hw_text = (char *) hw_version_text[i].hw_text;
return hw_version_text[i].text;
}
}
@ -2264,8 +2267,10 @@ VNA_SHELL_FUNCTION(cmd_info)
(void)argc;
(void)argv;
int i = 0;
while (info_about[i])
shell_printf("%s\r\n", info_about[i++]);
while (info_about[i]) {
shell_printf("%s%s\r\n", info_about[i], (i == 0 ? hw_text : ""));
i++;
}
#ifdef TINYSA3
if (has_esd)
shell_printf("ESD protected\r\n");

@ -161,6 +161,7 @@ typedef uint64_t freq_t;
extern uint16_t hw_if;
#define DEFAULT_SPUR_OFFSET ((freq_t)(actual_rbw_x10 > 3000 ? 1500000 : 1000000))
#define STATIC_DEFAULT_SPUR_OFFSET ((freq_t) 1500000)
extern char *hw_text;
#define MAX_LOW_OUTPUT_FREQ ((freq_t)1130000000)
#define HIGH_MIN_FREQ_MHZ 136// 825

@ -656,6 +656,7 @@ show_version(void)
// Version text for tinySA4
#ifdef TINYSA4
ili9341_drawstring_10x14(info_about[i++], x , y);
ili9341_drawstring_10x14(hw_text, x + 138 , y);
y+=FONT_GET_HEIGHT*3+2-5;
ili9341_drawstring_7x13(info_about[i++], x , y);
while (info_about[i]) {

Loading…
Cancel
Save

Powered by TurnKey Linux.