-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGet OS
More file actions
53 lines (42 loc) · 1.26 KB
/
Get OS
File metadata and controls
53 lines (42 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
'Program author: Ian Higgins
'Declare Constants
'Example:
'CONST PI = 3.141592654 or Const PI = 4*ATN(1)
'Declare Public Variables
'Example:
Public PTemp, Batt_volt
Public OS_String As String
Public Filter_Cell210 As String
Public Modem_String As String
Public Internal_Modem
'Declare Private Variables
'Example:
'Dim Counter
'Define Data Tables.
DataTable (Test,1,-1) 'Set table size to # of records, or -1 to autoallocate.
DataInterval (0,15,Sec,10)
Minimum (1,Batt_volt,FP2,False,False)
Sample (1,PTemp,FP2)
EndTable
'Define Subroutines
'Sub
'EndSub
'Main Program
BeginProg
' gets OS from Settings Table, this doesnt have to be in a scan but cannot be in a sub because a table is called (or so I think)
OS_String = Status.OSVersion(3,0)
Filter_Cell210 = "CELL210" 'while CRBasic is not case sensitive searching in a string is case sensitive
Modem_String = InStr(1,OS_String,Filter_Cell210,2)
Scan (1,Sec,0,0)
Internal_Modem= IIF(Modem_String = "CELL210",0,1) ' if no internal modem return zero, if internal modem (CELL210) return 1
'Internal_Modem = True
' Else Internal_Modem = False
'EndIf
'PanelTemp (PTemp,60)
Battery (Batt_volt)
'Enter other measurement instructions
'Call Output Tables
'Example:
CallTable Test
NextScan
EndProg