comparison ffstools/cal2text/main.c @ 289:329c31f7c797

fc-cal2text changed to emit Tx ramps for each band as a single table
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 18 Nov 2017 02:01:57 +0000
parents d41edd329670
children
comparison
equal deleted inserted replaced
288:730cdd32c3b9 289:329c31f7c797
16 extern void write_stdmap_ascii(); 16 extern void write_stdmap_ascii();
17 extern void write_afcparams_table(); 17 extern void write_afcparams_table();
18 extern void write_agcwords_table(); 18 extern void write_agcwords_table();
19 extern void write_agcglobals_table(); 19 extern void write_agcglobals_table();
20 extern void write_il2agc_table(); 20 extern void write_il2agc_table();
21 extern void write_tx_ramps_table();
21 extern void write_tx_levels_table(); 22 extern void write_tx_levels_table();
22 extern void write_tx_calchan_table(); 23 extern void write_tx_calchan_table();
23 extern void write_tx_caltemp_table(); 24 extern void write_tx_caltemp_table();
24 extern void write_rx_calchan_table(); 25 extern void write_rx_calchan_table();
25 extern void write_rx_caltemp_table(); 26 extern void write_rx_caltemp_table();
26 extern void write_rx_agcparams_table(); 27 extern void write_rx_agcparams_table();
27 extern void write_tx_ramp();
28 28
29 struct output_chunk { 29 struct output_chunk {
30 unsigned offset; 30 unsigned offset;
31 char *outfile; 31 char *outfile;
32 void (*conv_func)(); 32 void (*conv_func)();
56 56
57 static struct output_chunk agcwords_handling = { 57 static struct output_chunk agcwords_handling = {
58 0, "agcwords", write_agcwords_table 58 0, "agcwords", write_agcwords_table
59 }; 59 };
60 60
61 static struct output_chunk tx_ramps_handling[16] = { 61 static struct output_chunk tx_ramps_handling = {
62 {0x000, "ramp00", write_tx_ramp}, 62 0, "ramps", write_tx_ramps_table
63 {0x020, "ramp01", write_tx_ramp},
64 {0x040, "ramp02", write_tx_ramp},
65 {0x060, "ramp03", write_tx_ramp},
66 {0x080, "ramp04", write_tx_ramp},
67 {0x0A0, "ramp05", write_tx_ramp},
68 {0x0C0, "ramp06", write_tx_ramp},
69 {0x0E0, "ramp07", write_tx_ramp},
70 {0x100, "ramp08", write_tx_ramp},
71 {0x120, "ramp09", write_tx_ramp},
72 {0x140, "ramp10", write_tx_ramp},
73 {0x160, "ramp11", write_tx_ramp},
74 {0x180, "ramp12", write_tx_ramp},
75 {0x1A0, "ramp13", write_tx_ramp},
76 {0x1C0, "ramp14", write_tx_ramp},
77 {0x1E0, "ramp15", write_tx_ramp},
78 }; 63 };
79 64
80 static struct output_chunk tx_levels_handling = { 65 static struct output_chunk tx_levels_handling = {
81 0, "levels", write_tx_levels_table 66 0, "levels", write_tx_levels_table
82 }; 67 };
113 {"afcparams", 24, "global", &afcparams_handling, 1}, 98 {"afcparams", 24, "global", &afcparams_handling, 1},
114 {"rx/agcglobals", 8, "global", &agcglobals_handling, 1}, 99 {"rx/agcglobals", 8, "global", &agcglobals_handling, 1},
115 {"rx/il2agc", 363, "global", il2agc_handling, 3}, 100 {"rx/il2agc", 363, "global", il2agc_handling, 3},
116 {"rx/agcwords", 40, "global", &agcwords_handling, 1}, 101 {"rx/agcwords", 40, "global", &agcwords_handling, 1},
117 102
118 {"tx/ramps.850", 512, "tx-850", tx_ramps_handling, 16}, 103 {"tx/ramps.850", 512, "tx-850", &tx_ramps_handling, 1},
119 {"tx/levels.850", 128, "tx-850", &tx_levels_handling, 1}, 104 {"tx/levels.850", 128, "tx-850", &tx_levels_handling, 1},
120 {"tx/calchan.850", 128, "tx-850", &tx_calchan_handling, 1}, 105 {"tx/calchan.850", 128, "tx-850", &tx_calchan_handling, 1},
121 {"tx/caltemp.850", 40, "tx-850", &tx_caltemp_handling, 1}, 106 {"tx/caltemp.850", 40, "tx-850", &tx_caltemp_handling, 1},
122 {"rx/calchan.850", 40, "rx-850", &rx_calchan_handling, 1}, 107 {"rx/calchan.850", 40, "rx-850", &rx_calchan_handling, 1},
123 {"rx/caltemp.850", 44, "rx-850", &rx_caltemp_handling, 1}, 108 {"rx/caltemp.850", 44, "rx-850", &rx_caltemp_handling, 1},
124 {"rx/agcparams.850", 8, "rx-850", &rx_agcparams_handling, 1}, 109 {"rx/agcparams.850", 8, "rx-850", &rx_agcparams_handling, 1},
125 110
126 {"tx/ramps.900", 512, "tx-900", tx_ramps_handling, 16}, 111 {"tx/ramps.900", 512, "tx-900", &tx_ramps_handling, 1},
127 {"tx/levels.900", 128, "tx-900", &tx_levels_handling, 1}, 112 {"tx/levels.900", 128, "tx-900", &tx_levels_handling, 1},
128 {"tx/calchan.900", 128, "tx-900", &tx_calchan_handling, 1}, 113 {"tx/calchan.900", 128, "tx-900", &tx_calchan_handling, 1},
129 {"tx/caltemp.900", 40, "tx-900", &tx_caltemp_handling, 1}, 114 {"tx/caltemp.900", 40, "tx-900", &tx_caltemp_handling, 1},
130 {"rx/calchan.900", 40, "rx-900", &rx_calchan_handling, 1}, 115 {"rx/calchan.900", 40, "rx-900", &rx_calchan_handling, 1},
131 {"rx/caltemp.900", 44, "rx-900", &rx_caltemp_handling, 1}, 116 {"rx/caltemp.900", 44, "rx-900", &rx_caltemp_handling, 1},
132 {"rx/agcparams.900", 8, "rx-900", &rx_agcparams_handling, 1}, 117 {"rx/agcparams.900", 8, "rx-900", &rx_agcparams_handling, 1},
133 118
134 {"tx/ramps.1800", 512, "tx-1800", tx_ramps_handling, 16}, 119 {"tx/ramps.1800", 512, "tx-1800", &tx_ramps_handling, 1},
135 {"tx/levels.1800", 128, "tx-1800", &tx_levels_handling, 1}, 120 {"tx/levels.1800", 128, "tx-1800", &tx_levels_handling, 1},
136 {"tx/calchan.1800", 128, "tx-1800", &tx_calchan_handling, 1}, 121 {"tx/calchan.1800", 128, "tx-1800", &tx_calchan_handling, 1},
137 {"tx/caltemp.1800", 40, "tx-1800", &tx_caltemp_handling, 1}, 122 {"tx/caltemp.1800", 40, "tx-1800", &tx_caltemp_handling, 1},
138 {"rx/calchan.1800", 40, "rx-1800", &rx_calchan_handling, 1}, 123 {"rx/calchan.1800", 40, "rx-1800", &rx_calchan_handling, 1},
139 {"rx/caltemp.1800", 44, "rx-1800", &rx_caltemp_handling, 1}, 124 {"rx/caltemp.1800", 44, "rx-1800", &rx_caltemp_handling, 1},
140 {"rx/agcparams.1800", 8, "rx-1800", &rx_agcparams_handling, 1}, 125 {"rx/agcparams.1800", 8, "rx-1800", &rx_agcparams_handling, 1},
141 126
142 {"tx/ramps.1900", 512, "tx-1900", tx_ramps_handling, 16}, 127 {"tx/ramps.1900", 512, "tx-1900", &tx_ramps_handling, 1},
143 {"tx/levels.1900", 128, "tx-1900", &tx_levels_handling, 1}, 128 {"tx/levels.1900", 128, "tx-1900", &tx_levels_handling, 1},
144 {"tx/calchan.1900", 128, "tx-1900", &tx_calchan_handling, 1}, 129 {"tx/calchan.1900", 128, "tx-1900", &tx_calchan_handling, 1},
145 {"tx/caltemp.1900", 40, "tx-1900", &tx_caltemp_handling, 1}, 130 {"tx/caltemp.1900", 40, "tx-1900", &tx_caltemp_handling, 1},
146 {"rx/calchan.1900", 40, "rx-1900", &rx_calchan_handling, 1}, 131 {"rx/calchan.1900", 40, "rx-1900", &rx_calchan_handling, 1},
147 {"rx/caltemp.1900", 44, "rx-1900", &rx_caltemp_handling, 1}, 132 {"rx/caltemp.1900", 44, "rx-1900", &rx_caltemp_handling, 1},