From 8016d9ab22809741d8b81f6e2b0039d79ffb3f7b Mon Sep 17 00:00:00 2001 From: Stefan `Sec` Zehl Date: Tue, 31 Jan 2012 18:07:40 +0100 Subject: [PATCH] Allow calling "rf" from another dir. Also fix option doku. --- tools/mesh/rf | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/mesh/rf b/tools/mesh/rf index 23f68b3..7445876 100755 --- a/tools/mesh/rf +++ b/tools/mesh/rf @@ -8,7 +8,8 @@ use IO::Select; use Digest::CRC qw(crcccitt); use POSIX qw(strftime); -use lib '.'; +use FindBin; +use lib "$FindBin::Bin"; use r0ket; $|=1; @@ -28,7 +29,7 @@ if ($ARGV[0] =~ /^-?-?h/){ print STDERR " - r ascii : asciidump packets\n"; print STDERR " - r beacon : parse as openbeacon\n"; print STDERR " - r mesh : parse as mesh packet\n"; - print STDERR " - r m : and show only \n"; + print STDERR " - r game : parse as game packet(incomplete)\n"; print STDERR "\n"; print STDERR "send: send packet (number) times\n"; print STDERR " - s raw : send raw hex packet\n"; @@ -39,6 +40,8 @@ if ($ARGV[0] =~ /^-?-?h/){ print STDERR "preset: config per preset\n"; print STDERR "- p m - preset minimesh\n"; print STDERR "- p b - preset openbeacon\n"; + print STDERR "- p a - preset game announce\n"; + print STDERR "- p r - preset sample game\n"; print STDERR "config: config rf chip\n"; print STDERR "- c rx - set rxmac\n"; print STDERR "- c tx - set txmac\n";