diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2011-07-17 12:05:07 +0200 |
---|---|---|
committer | Sylvain Munaut <tnt@246tNt.com> | 2011-07-17 12:05:07 +0200 |
commit | 290884990881f61aa0906a2483d5f6c14bd6ec3e (patch) | |
tree | 1b37175d249bf3c8114ed0127b54fc65b3c00109 /src/target/firmware/apps | |
parent | 9548ac0a419ac810d44516d040495cbfde19c79f (diff) |
fw/apps: Remove manual gain control with keyboard
- It's broken by the use of compute_gain
- Since there is now an AGC loop, manually setting the register
as no effect.
If someone needs manual gain control for testing, he'll have to
re-implement a proper AGC override.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'src/target/firmware/apps')
-rw-r--r-- | src/target/firmware/apps/l1test/main.c | 27 | ||||
-rw-r--r-- | src/target/firmware/apps/layer1/main.c | 27 |
2 files changed, 0 insertions, 54 deletions
diff --git a/src/target/firmware/apps/l1test/main.c b/src/target/firmware/apps/l1test/main.c index fc51acdc..d1ca3d60 100644 --- a/src/target/firmware/apps/l1test/main.c +++ b/src/target/firmware/apps/l1test/main.c @@ -203,19 +203,8 @@ int main(void) twl3025_power_off(); } -static int8_t vga_gain = 40; -static int high_gain = 0; static int afcout = 0; -static void update_vga_gain(void) -{ - printf("VGA Gain: %u %s\n", vga_gain, high_gain ? "HIGH" : "LOW"); - trf6151_compute_gain(vga_gain, high_gain); - tpu_enq_sleep(); - tpu_enable(1); - tpu_wait_idle(); -} - static void tspact_toggle(uint8_t num) { printf("TSPACT%u toggle\n", num); @@ -231,22 +220,6 @@ static void key_handler(enum key_codes code, enum key_states state) return; switch (code) { - case KEY_1: /* VGA gain decrement */ - vga_gain -= 2; - if (vga_gain < 14) - vga_gain = 14; - update_vga_gain(); - break; - case KEY_2: /* High/Low Rx gain */ - high_gain ^= 1; - update_vga_gain(); - break; - case KEY_3: /* VGA gain increment */ - vga_gain += 2; - if (vga_gain > 40) - vga_gain = 40; - update_vga_gain(); - break; case KEY_4: tspact_toggle(6); /* TRENA (RFFE) */ break; diff --git a/src/target/firmware/apps/layer1/main.c b/src/target/firmware/apps/layer1/main.c index db760982..8eaf4a60 100644 --- a/src/target/firmware/apps/layer1/main.c +++ b/src/target/firmware/apps/layer1/main.c @@ -87,19 +87,8 @@ int main(void) twl3025_power_off(); } -static int8_t vga_gain = 40; -static int high_gain = 0; static int afcout = 0; -static void update_vga_gain(void) -{ - printf("VGA Gain: %u %s\n", vga_gain, high_gain ? "HIGH" : "LOW"); - trf6151_compute_gain(vga_gain, high_gain); - tpu_enq_sleep(); - tpu_enable(1); - tpu_wait_idle(); -} - static void tspact_toggle(uint8_t num) { printf("TSPACT%u toggle\n", num); @@ -115,22 +104,6 @@ static void key_handler(enum key_codes code, enum key_states state) return; switch (code) { - case KEY_1: /* VGA gain decrement */ - vga_gain -= 2; - if (vga_gain < 14) - vga_gain = 14; - update_vga_gain(); - break; - case KEY_2: /* High/Low Rx gain */ - high_gain ^= 1; - update_vga_gain(); - break; - case KEY_3: /* VGA gain increment */ - vga_gain += 2; - if (vga_gain > 40) - vga_gain = 40; - update_vga_gain(); - break; case KEY_4: tspact_toggle(6); /* TRENA (RFFE) */ break; |