X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=lib%2Fradio.c;h=8db3d384d9a7d4c4acdca8a9201b5d98567b31e6;hb=63444196dd1edb154f81d9418b3d0bc2367163e5;hp=1e7ee0eabe51946164e2f249257fbed42b7cd490;hpb=09ed626f25fb3e7c57ad7a59e5261ea005aa498f;p=ap-utils.git diff --git a/lib/radio.c b/lib/radio.c index 1e7ee0e..8db3d38 100644 --- a/lib/radio.c +++ b/lib/radio.c @@ -22,7 +22,6 @@ #include #include #include "ap-utils.h" -#include "ap-curses.h" #define RADIO_HELP _("[key] - power level; UIOP or LR - antenna; W - write config; Q - quit to menu") @@ -90,6 +89,13 @@ void power() varbind varbinds[2]; int i, c = 0, antenna_vlen; + if (ap_type == ATMEL12350) { + TestModeRadioConfiguration[5] = 0xE0; + TestModeRadioConfiguration[6] = 0x3E; + operAntennaSettings[5] = 0xE0; + operAntennaSettings[6] = 0x3E; + } + varbinds[0].oid = TestModeRadioConfiguration; varbinds[0].len_oid = sizeof(TestModeRadioConfiguration); varbinds[0].value = TestModeRadioConfiguration; @@ -102,7 +108,7 @@ void power() varbinds[1].type = NULL_VALUE; print_help(WAIT_RET); - if (snmp(varbinds, 2, GET) <= 0) { + if (snmp(varbinds, 2, GET) < 2) { print_helperr(ERR_RET); goto exit; } @@ -111,7 +117,7 @@ void power() memcpy(power, varbinds[0].value, 14); antenna_vlen = varbinds[1].len_val; - print_title(_("Radio Configuration")); + print_top(NULL, _("Radio Configuration")); mvwaddstr(main_sub, 0, 1, _("Output RF signal power level (CR31 register values)")); mvwaddstr(main_sub, 1, 1, "---------------------------------------------------"); mvwaddstr(main_sub, 2, 1, _("Key Channel Level")); @@ -304,6 +310,7 @@ void power() exit: getch(); quit: - print_title(""); + print_top(NULL, NULL); clear_main(0); } +