source: other-projects/diy-streetview-pano-capture/trunk/Server/classes/console/where_am_i.pm@ 26882

Last change on this file since 26882 was 26882, checked in by davidb, 11 years ago

Joshua Hollands software for operation with the diy camera built for Smoke and Mirrors 2012

File size: 802 bytes
Line 
1#!/usr/bin/perl -w
2use warnings;
3use strict;
4
5package where_am_i
6{
7 sub new
8 {
9 my $class = shift;
10 my $self = {};
11 bless($self, $class);
12 return $self;
13 }
14
15 sub doupstart
16 {
17 return 0;
18 }
19
20 sub command
21 {
22 return "WhERe Am i";
23 }
24
25 sub help
26 {
27 return "show the current GPS location";
28 }
29
30 sub do
31 {
32 my $gps = $main::settings{'gps'};
33 if (defined($gps) && $gps->hasgps)
34 {
35 my $mylocation = $gps->location;
36 print $main::socket "You are at: ", $mylocation, "\n";
37 }
38 else
39 {
40 print $main::socket "No Location service was found at program start.\n";
41 }
42 }
43
44 sub defaultsettings
45 {
46 return undef;
47 }
48
491;
50}
Note: See TracBrowser for help on using the repository browser.