Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: GPS capture blows away subsequent backtick command

by phaylon (Curate)
on Jan 12, 2007 at 10:53 UTC ( [id://594345]=note: print w/replies, xml ) Need Help??


in reply to GPS capture blows away subsequent backtick command

You didn't ask a question and didn't provide source code demonstrating your problem. So how should we help you? We mostly want to, but only if you don't make it too hard for us.

Ordinary morality is for ordinary people. -- Aleister Crowley
  • Comment on Re: GPS capture blows away subsequent backtick command

Replies are listed 'Best First'.
Re^2: GPS capture blows away subsequent backtick command
by JustMu (Initiate) on Jan 12, 2007 at 14:59 UTC
    A question was implied. Here's the relevant code, which I didn't post before because I doubt it'll help. I was hoping that someone had already encountered this trouble, which I suspect has something to do with Win32::SerialPort.
    # First call this sub. sub connectToGPS { my $gps; if ($winMain->rbNMEA->Checked()) { $gps = new GPS::NMEA(Port => $winMain->cbGPSPort->Text(), Baud => $winMain->cbPortBaud->Text()); } else { $gps = new GPS::Garmin(Port => $winMain->cbGPSPort->Text(), Baud => $winMain->cbPortBaud->Text()); } return $gps; } # Then pass its returned value to this sub. sub getGPSData { my $gps = shift; my %gpsHash = %{$gps}; my $port = $gpsHash{serial}; $port->purge_all(); $port->stty_kill("\cU"); my ($time, $satsUsed, $accuracy, $quality, $speed); if ($winMain->rbNMEA->Checked()) { $gps->parse(); my %gpsData = %{$gps->{NMEADATA}}; $time = $gpsData{time_utc}; $time = "---" unless $time; $satsUsed = $gpsData{num_sat_tracked}; $satsUsed = "---" unless $satsUsed; $satsUsed = 0 if $satsUsed eq "00"; $accuracy = $gpsData{data_valid}; $accuracy = "---" unless $accuracy; $quality = $gpsData{fixq012}; $quality = "---" unless $quality; $speed = $gpsData{speed_over_ground}; $speed = "---" unless $speed; $speed = "---" if $speed eq ""; } else { my ($sec, $min, $hour, $mday, $mon, $year) = $gps->get_time(); $time = "$hour:$min:$sec"; $time = "---" if $time eq "::"; } my ($latitudeSign, $latitude, $longitudeSign, $longitude) = $gps-> +get_position(); $port->close(); # Irrelevant GUI update code goes here. }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://594345]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2024-04-19 08:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found