Skip to content

Commit e339c93

Browse files
committed
RTKLIB 2.4.2
RTKLIB 2.4.2
0 parents  commit e339c93

File tree

818 files changed

+549988
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

818 files changed

+549988
-0
lines changed

.gitattributes

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
# Custom for Visual Studio
5+
*.cs diff=csharp
6+
*.sln merge=union
7+
*.csproj merge=union
8+
*.vbproj merge=union
9+
*.fsproj merge=union
10+
*.dbproj merge=union
11+
12+
# Standard to msysgit
13+
*.doc diff=astextplain
14+
*.DOC diff=astextplain
15+
*.docx diff=astextplain
16+
*.DOCX diff=astextplain
17+
*.dot diff=astextplain
18+
*.DOT diff=astextplain
19+
*.pdf diff=astextplain
20+
*.PDF diff=astextplain
21+
*.rtf diff=astextplain
22+
*.RTF diff=astextplain

app/appcmn/aboutdlg.cpp

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
//---------------------------------------------------------------------------
2+
#include <vcl.h>
3+
#pragma hdrstop
4+
5+
#include "rtklib.h"
6+
#include "aboutdlg.h"
7+
//---------------------------------------------------------------------------
8+
#pragma package(smart_init)
9+
#pragma resource "*.dfm"
10+
TAboutDialog *AboutDialog;
11+
//---------------------------------------------------------------------------
12+
__fastcall TAboutDialog::TAboutDialog(TComponent* Owner)
13+
: TForm(Owner)
14+
{
15+
}
16+
//---------------------------------------------------------------------------
17+
void __fastcall TAboutDialog::FormShow(TObject *Sender)
18+
{
19+
TImage *icon[]={Icon1,Icon2,Icon3,Icon4,Icon5,Icon6,Icon7,Icon8};
20+
AnsiString s;
21+
if (IconIndex>0) icon[IconIndex-1]->Visible=true;
22+
LabelAbout->Caption=About;
23+
LabelVer->Caption=s.sprintf("with RTKLIB ver.%s",VER_RTKLIB);
24+
LabelCopyright->Caption=COPYRIGHT_RTKLIB;
25+
}
26+
//---------------------------------------------------------------------------

app/appcmn/aboutdlg.dfm

+6,273
Large diffs are not rendered by default.

app/appcmn/aboutdlg.h

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
//---------------------------------------------------------------------------
2+
#ifndef aboutdlgH
3+
#define aboutdlgH
4+
//---------------------------------------------------------------------------
5+
#include <Classes.hpp>
6+
#include <Controls.hpp>
7+
#include <StdCtrls.hpp>
8+
#include <Forms.hpp>
9+
#include <ExtCtrls.hpp>
10+
#include <Graphics.hpp>
11+
//---------------------------------------------------------------------------
12+
class TAboutDialog : public TForm
13+
{
14+
__published:
15+
TLabel *LabelVer;
16+
TLabel *LabelAbout;
17+
TLabel *LabelCopyright;
18+
TImage *Icon4;
19+
TImage *Icon1;
20+
TImage *Icon2;
21+
TImage *Icon3;
22+
TImage *Icon5;
23+
TImage *Icon6;
24+
TImage *Icon7;
25+
TPanel *Panel1;
26+
TButton *BtnOk;
27+
TImage *Icon8;
28+
void __fastcall FormShow(TObject *Sender);
29+
private:
30+
public:
31+
int IconIndex;
32+
AnsiString About;
33+
__fastcall TAboutDialog(TComponent* Owner);
34+
};
35+
//---------------------------------------------------------------------------
36+
extern PACKAGE TAboutDialog *AboutDialog;
37+
//---------------------------------------------------------------------------
38+
#endif

app/appcmn/cmdoptdlg.cpp

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
//---------------------------------------------------------------------------
2+
#include <vcl.h>
3+
#include <stdio.h>
4+
#pragma hdrstop
5+
6+
#include "cmdoptdlg.h"
7+
8+
//---------------------------------------------------------------------------
9+
#pragma package(smart_init)
10+
#pragma resource "*.dfm"
11+
TCmdOptDialog *CmdOptDialog;
12+
//---------------------------------------------------------------------------
13+
__fastcall TCmdOptDialog::TCmdOptDialog(TComponent* Owner)
14+
: TForm(Owner)
15+
{
16+
CmdEna[0]=CmdEna[1]=1;
17+
}
18+
//---------------------------------------------------------------------------
19+
void __fastcall TCmdOptDialog::FormShow(TObject *Sender)
20+
{
21+
OpenCmd->Text=Cmds[0];
22+
CloseCmd->Text=Cmds[1];
23+
ChkOpenCmd->Checked=CmdEna[0];;
24+
ChkCloseCmd->Checked=CmdEna[1];;
25+
UpdateEnable();
26+
}
27+
//---------------------------------------------------------------------------
28+
void __fastcall TCmdOptDialog::BtnOkClick(TObject *Sender)
29+
{
30+
Cmds[0]=OpenCmd->Text;
31+
Cmds[1]=CloseCmd->Text;
32+
CmdEna[0]=ChkOpenCmd->Checked;
33+
CmdEna[1]=ChkCloseCmd->Checked;
34+
}
35+
//---------------------------------------------------------------------------
36+
void __fastcall TCmdOptDialog::BtnLoadClick(TObject *Sender)
37+
{
38+
AnsiString OpenDialog_FileName;
39+
TMemo *cmd[]={OpenCmd,CloseCmd};
40+
FILE *fp;
41+
char buff[1024];
42+
int n=0;
43+
if (!OpenDialog->Execute()) return;
44+
OpenDialog_FileName=OpenDialog->FileName;
45+
if (!(fp=fopen(OpenDialog_FileName.c_str(),"r"))) return;
46+
cmd[0]->Text="";
47+
cmd[1]->Text="";
48+
while (fgets(buff,sizeof(buff),fp)) {
49+
if (buff[0]=='@') {n=1; continue;}
50+
if (buff[strlen(buff)-1]=='\n') buff[strlen(buff)-1]='\0';
51+
cmd[n]->Text=cmd[n]->Text+buff+"\r\n";
52+
}
53+
fclose(fp);
54+
}
55+
//---------------------------------------------------------------------------
56+
void __fastcall TCmdOptDialog::BtnSaveClick(TObject *Sender)
57+
{
58+
AnsiString SaveDialog_FileName;
59+
AnsiString OpenCmd_Text=OpenCmd->Text,CloseCmd_Text=CloseCmd->Text;
60+
FILE *fp;
61+
if (!SaveDialog->Execute()) return;
62+
SaveDialog_FileName=SaveDialog->FileName;
63+
if (!(fp=fopen(SaveDialog_FileName.c_str(),"w"))) return;
64+
fprintf(fp,"%s",OpenCmd_Text.c_str());
65+
fprintf(fp,"\n@\n");
66+
fprintf(fp,"%s",CloseCmd_Text.c_str());
67+
fclose(fp);
68+
}
69+
//---------------------------------------------------------------------------
70+
void __fastcall TCmdOptDialog::ChkCloseCmdClick(TObject *Sender)
71+
{
72+
UpdateEnable();
73+
}
74+
//---------------------------------------------------------------------------
75+
void __fastcall TCmdOptDialog::ChkOpenCmdClick(TObject *Sender)
76+
{
77+
UpdateEnable();
78+
}
79+
//---------------------------------------------------------------------------
80+
void __fastcall TCmdOptDialog::UpdateEnable(void)
81+
{
82+
OpenCmd->Enabled=ChkOpenCmd->Checked;
83+
CloseCmd->Enabled=ChkCloseCmd->Checked;
84+
}
85+
//---------------------------------------------------------------------------
86+

app/appcmn/cmdoptdlg.dfm

+107
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
object CmdOptDialog: TCmdOptDialog
2+
Left = 0
3+
Top = 0
4+
BorderIcons = [biSystemMenu]
5+
BorderStyle = bsDialog
6+
Caption = 'Serial/TCP Commands'
7+
ClientHeight = 264
8+
ClientWidth = 318
9+
Color = clBtnFace
10+
Font.Charset = DEFAULT_CHARSET
11+
Font.Color = clWindowText
12+
Font.Height = -11
13+
Font.Name = 'Tahoma'
14+
Font.Style = []
15+
OldCreateOrder = False
16+
Position = poMainFormCenter
17+
OnShow = FormShow
18+
PixelsPerInch = 96
19+
TextHeight = 13
20+
object BtnOk: TButton
21+
Left = 150
22+
Top = 240
23+
Width = 81
24+
Height = 23
25+
Caption = '&OK'
26+
ModalResult = 1
27+
TabOrder = 1
28+
OnClick = BtnOkClick
29+
end
30+
object BtnCancel: TButton
31+
Left = 234
32+
Top = 240
33+
Width = 81
34+
Height = 23
35+
Caption = '&Cancel'
36+
ModalResult = 2
37+
TabOrder = 0
38+
end
39+
object ChkOpenCmd: TCheckBox
40+
Left = 2
41+
Top = 2
42+
Width = 151
43+
Height = 17
44+
Caption = 'Commands at startup'
45+
TabOrder = 2
46+
OnClick = ChkOpenCmdClick
47+
end
48+
object ChkCloseCmd: TCheckBox
49+
Left = 2
50+
Top = 120
51+
Width = 157
52+
Height = 17
53+
Caption = 'Commands at shutdown'
54+
TabOrder = 4
55+
OnClick = ChkCloseCmdClick
56+
end
57+
object CloseCmd: TMemo
58+
Left = 2
59+
Top = 136
60+
Width = 311
61+
Height = 101
62+
ScrollBars = ssVertical
63+
TabOrder = 5
64+
WordWrap = False
65+
end
66+
object OpenCmd: TMemo
67+
Left = 2
68+
Top = 18
69+
Width = 311
70+
Height = 101
71+
ScrollBars = ssVertical
72+
TabOrder = 3
73+
WordWrap = False
74+
end
75+
object BtnLoad: TButton
76+
Left = 4
77+
Top = 240
78+
Width = 65
79+
Height = 23
80+
Caption = '&Load...'
81+
TabOrder = 6
82+
OnClick = BtnLoadClick
83+
end
84+
object BtnSave: TButton
85+
Left = 72
86+
Top = 240
87+
Width = 65
88+
Height = 23
89+
Caption = '&Save...'
90+
TabOrder = 7
91+
OnClick = BtnSaveClick
92+
end
93+
object SaveDialog: TSaveDialog
94+
Filter = 'Command File (*.cmd)|*.cmd|All File (*.*)|*.*'
95+
Options = [ofHideReadOnly, ofNoChangeDir, ofEnableSizing]
96+
Title = 'Save Serial Commands'
97+
Left = 264
98+
Top = 204
99+
end
100+
object OpenDialog: TOpenDialog
101+
Filter = 'Command File (*.cmd)|*.cmd|All File (*.*)|*.*'
102+
Options = [ofHideReadOnly, ofNoChangeDir, ofEnableSizing]
103+
Title = 'Load Serial Commands'
104+
Left = 236
105+
Top = 204
106+
end
107+
end

app/appcmn/cmdoptdlg.h

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
//---------------------------------------------------------------------------
2+
#ifndef cmdoptdlgH
3+
#define cmdoptdlgH
4+
//---------------------------------------------------------------------------
5+
#include <Classes.hpp>
6+
#include <Controls.hpp>
7+
#include <StdCtrls.hpp>
8+
#include <Forms.hpp>
9+
#include <Dialogs.hpp>
10+
//---------------------------------------------------------------------------
11+
class TCmdOptDialog : public TForm
12+
{
13+
__published:
14+
TButton *BtnOk;
15+
TButton *BtnCancel;
16+
TMemo *OpenCmd;
17+
TMemo *CloseCmd;
18+
TCheckBox *ChkOpenCmd;
19+
TCheckBox *ChkCloseCmd;
20+
TButton *BtnLoad;
21+
TButton *BtnSave;
22+
TSaveDialog *SaveDialog;
23+
TOpenDialog *OpenDialog;
24+
void __fastcall FormShow(TObject *Sender);
25+
void __fastcall BtnOkClick(TObject *Sender);
26+
void __fastcall ChkCloseCmdClick(TObject *Sender);
27+
void __fastcall ChkOpenCmdClick(TObject *Sender);
28+
void __fastcall UpdateEnable(void);
29+
void __fastcall BtnLoadClick(TObject *Sender);
30+
void __fastcall BtnSaveClick(TObject *Sender);
31+
private:
32+
public:
33+
AnsiString Cmds[2];
34+
int CmdEna[2];
35+
__fastcall TCmdOptDialog(TComponent* Owner);
36+
};
37+
//---------------------------------------------------------------------------
38+
extern PACKAGE TCmdOptDialog *CmdOptDialog;
39+
//---------------------------------------------------------------------------
40+
#endif

app/appcmn/confdlg.cpp

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//---------------------------------------------------------------------------
2+
#include <vcl.h>
3+
#pragma hdrstop
4+
5+
#include "confdlg.h"
6+
//---------------------------------------------------------------------------
7+
#pragma package(smart_init)
8+
#pragma resource "*.dfm"
9+
TConfDialog *ConfDialog;
10+
//---------------------------------------------------------------------------
11+
__fastcall TConfDialog::TConfDialog(TComponent* Owner)
12+
: TForm(Owner)
13+
{
14+
}
15+
//---------------------------------------------------------------------------

0 commit comments

Comments
 (0)