AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Programmieren allgemein daten von gps-maus über Com-Port auslesen
Thema durchsuchen
Ansicht
Themen-Optionen

daten von gps-maus über Com-Port auslesen

Ein Thema von btbe · begonnen am 10. Nov 2004 · letzter Beitrag vom 3. Mai 2008
 
xy124

Registriert seit: 3. Dez 2007
146 Beiträge
 
Delphi 7 Personal
 
#14

Re: daten von gps-maus über Com-Port auslesen

  Alt 3. Mai 2008, 11:19
mit Dialect WinCE mache ich das für meinen ppc so:
Delphi-Quellcode:

b1.onclick =func()
   l1.text= myport.read()//(l1=label)

   
   x=0//breite
   y=0//länge
   xmin=0
   ymin=0
   komma=0
   jo=0
   for i=1to len(l1.text)//in delphi heißt das length()
      u= l1.text[i]
      if jo=1
         if u=","
            komma=komma+1
         else
            if (komma==2) and x=0 then
               x=int(l1.text[i+1],l1.text[i+2])
               xmin=l1.text[i+3]l1.text[i+4],l1.text[i+5],l1.text[i+6],l1.text[i+7],l1.text[i+8],l1.text[i+9],l1.text[i+10]

               
            endif


            if (komma==4) and (y=0) //längengrad
               y=int(l1.text[i+1],l1.text[i+2],l1.text[i+3])

               ymin=l1.text[i+4],l1.text[i+5],l1.text[i+6],l1.text[i+7],l1.text[i+8],l1.text[i+9],l1.text[i+10],l1.text[i+11]

            endif
         endif
         
      endif
      if (u=="$") and (l1.text[i+1]=="G")   and (l1.text[i+1]=="P") and (l1.text[i+1]=="G") and (l1.text[i+1]=="G") and (l1.text[i+1]=="A")
         jo=1
      endif

   endfor
   
   l1.text=str$(y) + "°"+str$(ymin) + "min" + str$(x) + "°" + str$(xmin) + "min" //str$^=in delphi inttostr/floattostr
endfunc
myport=system.comport("COM5:",{baud:4800})
gui.enter()
^^problem ist hierbei, das das Dialectprogramm zu langsam auf dem ppc ist. deswegen will ich das problem eigentlich mit Lazarus lösen, ich finde aber kein Komponente zum Comport-auslesen der auf lazarus und dem ppc geht.
o o
LJ
TTT
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 06:48 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz