Changeset 3360
 Timestamp:
 Oct 11, 2012, 8:03:46 AM (18 months ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

dev/libertas.fth
r3337 r3360 652 652 dup h# 8 and if ." EEPROM does not exit;" then 653 653 dup h# 30 and case 654 h# 00 of ." TX ant anna 0;" endof654 h# 00 of ." TX antenna 0;" endof 655 655 h# 10 of ." TX antenna 1;" endof 656 656 ( default ) ." TX diversity; " … … 793 793 ; 794 794 795 0 [if] 796 : regaccess! ( n reg cmd  ) 797 8 swap preparecmd 798 ACTION_SET +xw 799 ( n reg ) +xw 800 ( n ) +xl 801 outbufwait drop 802 ; 803 [then] 804 795 805 : bbpreg@ ( reg  n ) 796 806 1a ( CMD_BBP_REG_ACCESS ) regaccess@ h# ff and … … 802 812 19 ( CMD_MAC_REG_ACCESS ) regaccess@ 803 813 ; 814 0 [if] 815 : bbpreg! ( n reg  ) 816 1a ( CMD_BBP_REG_ACCESS ) regaccess! 817 ; 818 : rfreg! ( n reg  ) 819 1b ( CMD_RF_REG_ACCESS ) regaccess! 820 ; 821 : macreg! ( n reg  ) 822 19 ( CMD_MAC_REG_ACCESS ) regaccess! 823 ; 824 [then] 825 804 826 : eeproml@ ( idx  n ) 805 827 a 59 ( CMD_EEPROM_ACCESS ) preparecmd … … 2315 2337 ; 2316 2338 2339 : showrssi (  ) 2340 getrssi ( base avg_nf avg_snr nf snr ) 2341 ." now" .rssi ( base avg_nf avg_snr ) 2342 ." avg" .rssi ( base ) 2343 ; 2344 2317 2345 : .antenna ( antenna  ) 2318 2346 dup h# ffff = if ." d" drop exit then \ diversity (default) 2319 2347 dup h# 100 = if ." ?" drop exit then \ occurs after 0/0 2320 2348 2 .r 2349 ; 2350 2351 : showantenna 2352 getantenna ." ant" .antenna 2321 2353 ; 2322 2354 … … 2341 2373 ; 2342 2374 2343 : showantenna (  ) 2344 base @ ( base ) 2345 getrssi ( base avg_nf avg_snr nf snr ) 2346 decimal 2347 ." now" .rssi ( base avg_nf avg_snr ) 2348 ." avg" .rssi ( base ) 2349 getantenna ( base antenna ) 2350 hex 2351 ." ant" .antenna ( base ) 2352 ." rx " h# 3f bbpreg@ .rxantenna ( base ) 2353 ." tx " h# 40 bbpreg@ .txantenna ( base ) 2354 base ! 2375 : showantennabbp (  ) 2376 ." rx " h# 3f bbpreg@ .rxantenna 2377 ." tx " h# 40 bbpreg@ .txantenna 2378 ; 2379 2380 0 value #antennae 2381 : tainit (  ) 2382 gethwspec 0= if d# 16 + lew@ to #antennae then 2383 #antennae 2384 case 2385 d# 1 of ." keys: (a,s,q)" endof 2386 d# 2 of ." keys: (0,1,2,3,d,a,s,q)" endof 2387 endcase 2388 cr 2389 ; 2390 2391 : tashow (  ) 2392 base @ ( base ) 2393 decimal ( base ) 2394 showrssi ( base ) 2395 #antennae d# 1 <> if ( base ) 2396 hex ( base ) 2397 showantenna ( base ) 2398 showantennabbp ( base ) 2399 then ( base ) 2400 base ! ( ) 2355 2401 ; 2356 2402 … … 2361 2407 ; 2362 2408 2409 : tan ( n  ) 2410 #antennae d# 2 = if 2411 ." antenna to" dup . 2412 setantenna cr 2413 else 2414 drop 2415 then 2416 ; 2417 2418 : tad 2419 #antennae d# 2 = if 2420 ." diversity " setantennadiversity cr 2421 then 2422 ; 2423 2424 : taa ." associate " close open drop ; 2425 2363 2426 : testantenna (  ) 2364 ." keys: (0,1,2,3,d,a,s,q)" cr2427 tainit 2365 2428 begin 2366 d# 100 ms showantennakey? if2429 d# 100 ms tashow key? if 2367 2430 cr key 2368 2431 case 2369 2432 h# 71 ( q ) of ." quit" exit endof 2370 h# 1b of exit endof2371 h# 30 ( 0 ) of ." antenna to 0 " 0 setantenna crendof2372 h# 31 ( 1 ) of ." antenna to 1 " 1 setantenna crendof2373 h# 32 ( 2 ) of ." antenna to 2 " 2 setantenna crendof2374 h# 33 ( 3 ) of ." antenna to 3 " 3 setantenna crendof2375 h# 64 ( d ) of ." diversity " setantennadiversity crendof2376 h# 61 ( a ) of ." associate " close open dropendof2433 h# 1b of exit endof 2434 h# 30 ( 0 ) of 0 tan endof 2435 h# 31 ( 1 ) of 1 tan endof 2436 h# 32 ( 2 ) of 2 tan endof 2437 h# 33 ( 3 ) of 3 tan endof 2438 h# 64 ( d ) of tad endof 2439 h# 61 ( a ) of taa endof 2377 2440 h# 73 ( s ) of tascan endof 2378 2441 endcase
Note: See TracChangeset
for help on using the changeset viewer.