aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2017-08-27 20:50:37 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2017-09-01 18:42:53 +0200
commit489ab9506ca597e36f0fe20ace34425709a313b1 (patch)
treec5879486f32f1dae814985bd7f6b4b1556f79a70
parent05c516ca16671bd34692ca220879be7c0d344d11 (diff)
TACS: Fix power levels
-rw-r--r--src/amps/amps_tacs_main.c7
-rw-r--r--src/amps/frame.c53
2 files changed, 19 insertions, 41 deletions
diff --git a/src/amps/amps_tacs_main.c b/src/amps/amps_tacs_main.c
index be4af4b..eee7dcc 100644
--- a/src/amps/amps_tacs_main.c
+++ b/src/amps/amps_tacs_main.c
@@ -58,13 +58,8 @@ void print_help(const char *arg0)
printf(" If the phone shows 'NoSrv', try the other way.\n");
printf(" -P --ms-power <power level>\n");
printf(" Give power level of the mobile station 0..7. (default = '%d')\n", ms_power);
- if (!tacs) {
- printf(" 0 = 4 W; 1 = 1.6 W; 2 = 630 mW; 3 = 250 mW;\n");
+ printf(" 0 = %2d W; 1 = 1.6 W; 2 = 630 mW; 3 = 250 mW;\n", (tacs) ? 10 : 4);
printf(" 4 = 100 mW; 5 = 40 mW; 6 = 16 mW; 7 = 6.3 mW\n");
- } else {
- printf(" 0 = 2.82 W; 1 = 1.12 W; 2 = 447 mW; 3 = 178 mW;\n");
- printf(" 4 = 70.8 mW; 5 = 28.2 mW; 6 = 11.2 mW; 7 = 4.5 mW\n");
- }
printf(" -D --dtx <parameter>\n");
printf(" Give DTX parameter for Discontinuous Transmission. (default = '%d')\n", dtx);
printf(" 0 = disable DTX; 1 = reserved;\n");
diff --git a/src/amps/frame.c b/src/amps/frame.c
index f7baf61..983649b 100644
--- a/src/amps/frame.c
+++ b/src/amps/frame.c
@@ -1728,43 +1728,26 @@ static const char *ie_chan(uint64_t value)
static const char *ie_cmac(uint64_t value)
{
- if (!tacs) {
- switch (value) {
- case 0:
+ switch (value) {
+ case 0:
+ if (!tacs)
return "6 dbW (4 Watts)";
- case 1:
- return "2 dbW (1.6 Watts)";
- case 2:
- return "-2 dbW (630 Milliwatts)";
- case 3:
- return "-6 dbW (250 Milliwatts)";
- case 4:
- return "-10 dbW (100 Milliwatts)";
- case 5:
- return "-14 dbW (40 Milliwatts)";
- case 6:
- return "-18 dbW (16 Milliwatts)";
- }
- return "-22 dbW (6.3 Milliwatts)";
- } else {
- switch (value) {
- case 0:
- return "4.5 dbW (2.82 Watts)";
- case 1:
- return "0.5 dbW (1.12 Watts)";
- case 2:
- return "-3.5 dbW (447 Milliwatts)";
- case 3:
- return "-7.5 dbW (178 Milliwatts)";
- case 4:
- return "-11.5 dbW (70.8 Milliwatts)";
- case 5:
- return "-15.5 dbW (28.2 Milliwatts)";
- case 6:
- return "-19.5 dbW (11.2 Milliwatts)";
- }
- return "-23.5 dbW (4.5 Milliwatts)";
+ else
+ return "10 dbW (10 Watts)";
+ case 1:
+ return "2 dbW (1.6 Watts)";
+ case 2:
+ return "-2 dbW (630 Milliwatts)";
+ case 3:
+ return "-6 dbW (250 Milliwatts)";
+ case 4:
+ return "-10 dbW (100 Milliwatts)";
+ case 5:
+ return "-14 dbW (40 Milliwatts)";
+ case 6:
+ return "-18 dbW (16 Milliwatts)";
}
+ return "-22 dbW (6.3 Milliwatts)";
}
static const char *ie_cmax(uint64_t value)