projects:ukhas_glider_project:master
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
projects:ukhas_glider_project:master [2007/09/23 21:56] – new code laurenceb | projects:ukhas_glider_project:master [2008/07/19 23:33] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 106: | Line 106: | ||
Landcount = 0 | Landcount = 0 | ||
Telcounter = 0 | Telcounter = 0 | ||
+ | Portd.3 = 1 | ||
Waitms 100 | Waitms 100 | ||
Gpintegerone = Getadc(5) | Gpintegerone = Getadc(5) | ||
Line 165: | Line 166: | ||
Gpfloatone = Target_es | Gpfloatone = Target_es | ||
If Target_e <> Gpfloatone Then Target_es = Target_e | If Target_e <> Gpfloatone Then Target_es = Target_e | ||
- | Portd.3 = 1 ' | + | Portd.3 = 1 |
- | Print " | + | Print " |
Start Watchdog | Start Watchdog | ||
Placemark = 1 ' | Placemark = 1 ' | ||
Line 240: | Line 241: | ||
Requestsecond = 1 | Requestsecond = 1 | ||
While Clearsecond = 0 | While Clearsecond = 0 | ||
- | | + | |
- | Wend | + | Wend ' |
- | Requestsecond = 0 | + | Requestsecond = 0 'it waits for a new gps before doing anything other than running off the gyro |
- | Waitus 50 | + | Waitus 50 ' the first update after this then goes into the gps lag compensation stage, but NOT YET !!!! |
Printbin #1 , Statuscode | Printbin #1 , Statuscode | ||
Line 394: | Line 395: | ||
If Radiocts = 1 Then ' | If Radiocts = 1 Then ' | ||
Call Radiocomms() | Call Radiocomms() | ||
- | Printstring = Str(gpsheading) | ||
- | Printstring = Left(printstring , 8) | ||
- | |||
End If | End If | ||
Loop | Loop | ||
Sub Checkvoltage() | Sub Checkvoltage() | ||
+ | S = " | ||
Gpintegerone = Getadc(5) | Gpintegerone = Getadc(5) | ||
Gpfloatone = Gpintegerone | Gpfloatone = Gpintegerone | ||
Gpfloatone = Gpfloatone * 9.503 | Gpfloatone = Gpfloatone * 9.503 | ||
Gpfloatone = Gpfloatone / 1000 | Gpfloatone = Gpfloatone / 1000 | ||
- | If Radiocts | + | Printstring |
+ | S = S + Printstring | ||
+ | S = S + "," | ||
Gpintegerone = Getadc(0) | Gpintegerone = Getadc(0) | ||
Gpfloatone = Gpintegerone | Gpfloatone = Gpintegerone | ||
Gpfloatone = Gpfloatone * 4.250 | Gpfloatone = Gpfloatone * 4.250 | ||
Gpfloatone = Gpfloatone / 1000 | Gpfloatone = Gpfloatone / 1000 | ||
- | If Radiocts | + | Printstring |
+ | S = S + Printstring | ||
+ | S = S + "," | ||
+ | Printstring | ||
+ | S = S + Printstring | ||
+ | S = S + "," | ||
+ | Printstring = Str(pulses) | ||
+ | S = S + Printstring | ||
+ | Print S | ||
+ | Print #4 , S | ||
Telcounter = 0 | Telcounter = 0 | ||
End Sub | End Sub | ||
Line 419: | Line 429: | ||
While Radiocts = 0 And Gpbyteone < 30 ' | While Radiocts = 0 And Gpbyteone < 30 ' | ||
| | ||
+ | Reset Watchdog | ||
Incr Gpbyteone | Incr Gpbyteone | ||
Wend | Wend | ||
- | Print " | + | Print "UKHASC,Cutdown channel=" |
If Channel = 1 Then Cutdownpinone = 1 | If Channel = 1 Then Cutdownpinone = 1 | ||
If Channel = 2 Then Cutdownpintwo = 1 | If Channel = 2 Then Cutdownpintwo = 1 | ||
Line 434: | Line 445: | ||
Sub Radiocomms() | Sub Radiocomms() | ||
If Statuscode = 0 Then | If Statuscode = 0 Then | ||
- | | + | |
Else | Else | ||
- | | + | |
End If | End If | ||
- | Print Contents(3) | + | S = S + Contents(3) |
- | Print #4 , " | + | S = S + Contents(4) |
+ | S = S + Contents(5) | ||
+ | S = S + Contents(6) | ||
+ | S = S + Contents(10) | ||
| | ||
- | Print "," | + | Printstring = "," |
- | Print #4 , "," | + | S = S + Printstring |
| | ||
- | Print "," | + | Printstring = "," |
- | Print #4 , "," | + | S = S + Printstring |
| | ||
- | Print "," | + | Printstring = "," |
- | Print #4 , "," | + | S = S + Printstring |
| | ||
- | Print "," | + | Printstring = "," |
- | Print #4 , "," | + | S = S + Printstring |
- | Print "," | + | Printstring = Str(error) |
- | Print #4 , Error; | + | |
+ | S = S + Printstring | ||
| | ||
- | Print "," | + | Printstring = "," |
- | Print #4 , "," | + | S = S + Printstring |
| | ||
- | Print "," | + | Printstring = "," |
- | Print #4 , "," | + | S = S + Printstring |
- | Printstring | + | Gpbyteone |
- | Print "," | + | S = S + "*" |
- | Print #4 , "," | + | |
- | | + | S = S + Printstring |
- | Print "," | + | Print S |
- | Print #4 , "," | + | Print #4 , S |
End Sub | End Sub | ||
</ | </ |
projects/ukhas_glider_project/master.1190584611.txt.gz · Last modified: 2008/07/19 23:32 (external edit)