]> git.decadent.org.uk Git - ap-utils.git/blobdiff - ap-gl/stations.c
Imported Upstream version 1.5~pre1
[ap-utils.git] / ap-gl / stations.c
index 63fe84a995f276b93fcf470b168575cfe0723c5a..9d47e0eab4618efa22f561ec415dac994e69a4af 100644 (file)
 #include <signal.h>
 #include <string.h>
 #include "ap-utils.h"
-#include "ap-curses.h"
 
 #define MAX_LINES LINES-4
 
-#define STAS _("Associated Stations")
-
 extern int LINES;
 extern WINDOW *main_sub;
 extern short ap_type;
 
-void stations()
+void atmel_stations()
 {
     char StasNum[] = {
        0x2B, 0x06, 0x01, 0x04, 0x01, 0x83, 0x1A, 0x01, 0x02, 0x05, 0x01, 0x00
@@ -63,7 +60,7 @@ void stations()
     int mac_num, begin, end, total_mac;
     varbind varbinds[1];
 
-    print_title(STAS);
+    print_top(NULL, TITLE_STAS);
 
     varbinds[0].oid = bridgeOperationalMode;
     varbinds[0].len_oid = sizeof(bridgeOperationalMode);
@@ -100,8 +97,8 @@ void stations()
     total_mac = *(varbinds[0].value);
     mac_num = 1;
 
-    sprintf(message, "%s: %d", STAS, total_mac);
-    print_title(message);
+    sprintf(message, "%s: %d", TITLE_STAS, total_mac);
+    print_top(NULL, message);
     mvwaddstr(main_sub, 0, 1, _("#     MAC       LQ    RSSI   Status Port IP"));
     noecho();
 
@@ -147,7 +144,9 @@ void stations()
 //     memcpy(curr->ParentMacAddress, mac->ParentMacAddress, 6);
        memcpy(&(curr->IP.s_addr), mac->IP, 4);
        curr->quality = 100 - (minimum(mac->LinkQuality, 40)*2.5);
-       curr->rssi = - 96 + mac->RSSI;
+//     curr->rssi = - 96 + mac->RSSI;
+//     curr->quality = mac->LinkQuality;
+       curr->rssi = mac->RSSI;
        
        curr->Port = mac->Port;
        curr->Status = mac->Status;
@@ -157,8 +156,8 @@ void stations()
     begin = 1;
     end = (MAX_LINES < mac_num) ? MAX_LINES : mac_num;
     scroll_rows(first, begin, end, 1, 2);
-    print_help(_("Arrows - scroll; S - save to file; Q - quit to menu."));
     while (1) {
+       print_help(_("Arrows - scroll; S - save to file; Q - quit to menu."));
        switch (getch()) {
        case 'S':
        case 's':
@@ -191,7 +190,7 @@ void stations()
        first = curr->next;
        free(curr);
     }
-    print_title("");
+    print_top(NULL, NULL);
     clear_main(0);
 }