[tuxdroid-svn] r334 - daemon/trunk/libs
Status: Beta
Brought to you by:
ks156
From: jaguarondi <c2m...@c2...> - 2007-06-01 07:41:46
|
Author: jaguarondi Date: 2007-06-01 09:41:43 +0200 (Fri, 01 Jun 2007) New Revision: 334 Modified: daemon/trunk/libs/USBDaemon_command_tux.c Log: - UpD: the ATR2406 channels were wrongly calculated from the wifi channel, changed to a table lookup. Modified: daemon/trunk/libs/USBDaemon_command_tux.c =================================================================== --- daemon/trunk/libs/USBDaemon_command_tux.c 2007-05-31 16:15:58 UTC (rev 333) +++ daemon/trunk/libs/USBDaemon_command_tux.c 2007-06-01 07:41:43 UTC (rev 334) @@ -919,10 +919,10 @@ * Conversion of the lower and higher frequencies of a wifi channel into * ATR2406 channel numbers. */ - uint8_t lower_ATR_channel = (uint8_t)(wifi_channel - 1) * 6; - uint8_t higher_ATR_channel = (uint8_t)(wifi_channel - 1) * 6 + 26; + uint8_t const lower_ATR_channel[14] = {0, 6, 12, 18, 24, 29, 35, 41, 47, 52, 58, 64, 70, 76}; + uint8_t const higher_ATR_channel[14] = {26, 32, 38, 43, 49, 55, 61, 67, 72, 78, 84, 90, 94, 94}; - return send_usb_dongle_cmd(USB_CONNECTION_CMD, USB_CONNECTION_CHANGE_ID, lower_ATR_channel, higher_ATR_channel); + return send_usb_dongle_cmd(USB_CONNECTION_CMD, USB_CONNECTION_CHANGE_ID, lower_ATR_channel[wifi_channel-1], higher_ATR_channel[wifi_channel-1]); } /** |