lmcconfig.c (302408) | lmcconfig.c (360675) |
---|---|
1/* 2 * First author: Michael Graff. 3 * Copyright (c) 1997-2000 Lan Media Corp. (www.lanmedia.com). 4 * All rights reserved. 5 * 6 * Second author: Andrew Stanley-Jones. 7 * Copyright (c) 2000-2002 SBE Corp. (www.sbei.com). 8 * All rights reserved. --- 48 unchanged lines hidden (view full) --- 57 * There is a man page for this program; go find it. 58 * 59 * If Netgraph is present (FreeBSD only): 60 * cc -o lmcconfig -l netgraph -D NETGRAPH lmcconfig.c 61 * If Netgraph is NOT present: 62 * cc -o lmcconfig lmcconfig.c 63 * Install the executable program in /usr/local/sbin/lmcconfig. 64 * | 1/* 2 * First author: Michael Graff. 3 * Copyright (c) 1997-2000 Lan Media Corp. (www.lanmedia.com). 4 * All rights reserved. 5 * 6 * Second author: Andrew Stanley-Jones. 7 * Copyright (c) 2000-2002 SBE Corp. (www.sbei.com). 8 * All rights reserved. --- 48 unchanged lines hidden (view full) --- 57 * There is a man page for this program; go find it. 58 * 59 * If Netgraph is present (FreeBSD only): 60 * cc -o lmcconfig -l netgraph -D NETGRAPH lmcconfig.c 61 * If Netgraph is NOT present: 62 * cc -o lmcconfig lmcconfig.c 63 * Install the executable program in /usr/local/sbin/lmcconfig. 64 * |
65 * $FreeBSD: stable/11/usr.sbin/lmcconfig/lmcconfig.c 299866 2016-05-15 21:45:04Z truckman $ | 65 * $FreeBSD: stable/11/usr.sbin/lmcconfig/lmcconfig.c 360675 2020-05-05 21:01:43Z dim $ |
66 */ 67 68#include <sys/param.h> 69#include <sys/ioctl.h> 70#include <sys/socket.h> 71 72#include <errno.h> 73#include <inttypes.h> --- 859 unchanged lines hidden (view full) --- 933static double 934vga_dbs(u_int8_t vga) 935{ 936 if (vga < 0x0F) return 0.0; 937 if ((vga >= 0x0F) && (vga <= 0x1B)) return 0.0 + 0.77 * (vga - 0x0F); 938 if ((vga >= 0x1C) && (vga <= 0x33)) return 10.0 + 1.25 * (vga - 0x1C); 939 if ((vga >= 0x34) && (vga <= 0x39)) return 40.0 + 1.67 * (vga - 0x34); 940 if ((vga >= 0x3A) && (vga < 0x3F)) return 50.0 + 2.80 * (vga - 0x3A); | 66 */ 67 68#include <sys/param.h> 69#include <sys/ioctl.h> 70#include <sys/socket.h> 71 72#include <errno.h> 73#include <inttypes.h> --- 859 unchanged lines hidden (view full) --- 933static double 934vga_dbs(u_int8_t vga) 935{ 936 if (vga < 0x0F) return 0.0; 937 if ((vga >= 0x0F) && (vga <= 0x1B)) return 0.0 + 0.77 * (vga - 0x0F); 938 if ((vga >= 0x1C) && (vga <= 0x33)) return 10.0 + 1.25 * (vga - 0x1C); 939 if ((vga >= 0x34) && (vga <= 0x39)) return 40.0 + 1.67 * (vga - 0x34); 940 if ((vga >= 0x3A) && (vga < 0x3F)) return 50.0 + 2.80 * (vga - 0x3A); |
941 return 64.0; | 941 return 64.0; |
942} 943 944static void 945print_rx_gain(void) 946{ 947 printf("Rx gain max:\t\t"); 948 949 if (config.rx_gain == CFG_GAIN_AUTO) --- 1604 unchanged lines hidden --- | 942} 943 944static void 945print_rx_gain(void) 946{ 947 printf("Rx gain max:\t\t"); 948 949 if (config.rx_gain == CFG_GAIN_AUTO) --- 1604 unchanged lines hidden --- |