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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
| Source code in C for save settings to a binary file
void SaveSettings(void)
{
WCHAR szFile[MAX_PATH] = L"";
wcscpy(szFile,g_szPath);
wcscat(szFile,_T("Settings.bin"));
FILE *file = _wfopen(szFile,L"wb");
if(file != NULL)
{
fwrite((void*)&g_fSemiAnchoTrabajo,sizeof(g_fSemiAnchoTrabajo),1,file);
fwrite((void*)&g_nTolerancia,sizeof(g_nTolerancia),1,file);
fwrite((void*)&rgbCurrentTrackDay,sizeof(COLORREF),1,file);
fwrite((void*)&acrCustClrTrackDay[0],sizeof(COLORREF),16,file);
fwrite((void*)&rgbCurrentBkgndDay,sizeof(COLORREF),1,file);
fwrite((void*)&acrCustClrBkgndDay[0],sizeof(COLORREF),16,file);
fwrite((void*)g_szLicense,sizeof(WCHAR),33,file);
fwrite((void*)&g_nReviewAccel,sizeof(g_nReviewAccel),1,file);
fwrite((void*)&g_bGPSID,sizeof(g_bGPSID),1,file);
fwrite((void*)&g_nPuerto,sizeof(g_nPuerto),1,file);
fwrite((void*)&g_nBaudios,sizeof(g_nBaudios),1,file);
fwrite((void*)&g_fZoom,sizeof(g_fZoom),1,file);
fwrite((void*)&g_dSpeedUmbral,sizeof(g_dSpeedUmbral),1,file);
fwrite((void*)&g_nDistanceUmbral,sizeof(g_nDistanceUmbral),1,file);
fwrite((void*)&g_dHDOPUmbral,sizeof(g_dHDOPUmbral),1,file);
fwrite((void*)&g_bEscalaTractor,sizeof(g_bEscalaTractor),1,file);
fwrite((void*)&rgbCurrentText,sizeof(COLORREF),1,file);
fwrite((void*)&acrCustClrText[0],sizeof(COLORREF),16,file);
fwrite((void*)&g_bDibujarTractor,sizeof(g_bDibujarTractor),1,file);
fwrite((void*)&g_bShowGuideNumber,sizeof(g_bShowGuideNumber),1,file);
fwrite((void*)&g_bUnits,sizeof(g_bUnits),1,file);
fwrite((void*)&g_bIdioma,sizeof(g_bIdioma),1,file);
fwrite((void*)&g_fAnchoTrabajo,sizeof(g_fAnchoTrabajo),1,file);
fwrite((void*)&g_bAutoSNOFF,sizeof(g_bAutoSNOFF),1,file);
fwrite((void*)&g_bAutoSBASON,sizeof(g_bAutoSBASON),1,file);
fwrite((void*)&g_nXOffset,sizeof(g_nXOffset),1,file);
fwrite((void*)&g_nYOffset,sizeof(g_nYOffset),1,file);
fwrite((void*)&g_bGIFType,sizeof(g_bGIFType),1,file);
int len = wcslen(g_szBTDevice);
fwrite((void*)&len,sizeof(len),1,file);
fwrite((void*)g_szBTDevice,sizeof(WCHAR),(1+len)*sizeof(WCHAR),file);
fwrite((void*)&g_bDaySettings,sizeof(g_bDaySettings),1,file);
fwrite((void*)&rgbCurrentTrackNight,sizeof(COLORREF),1,file);
fwrite((void*)&acrCustClrTrackNight[0],sizeof(COLORREF),16,file);
fwrite((void*)&rgbCurrentBkgndNight,sizeof(COLORREF),1,file);
fwrite((void*)&acrCustClrBkgndNight[0],sizeof(COLORREF),16,file);
fclose(file);
}
} Definitions:
Size Name Description
USHORT g_fSemiAnchoTrabajo Half of width tool, in centimeter
float g_nTolerancia Arrow tolerance, in decimeter
DWORD rgbCurrentTrackDay Color track day
16 DWORD acrCustClrTrackDay Array custom for color track day
DWORD rgbCurrentBkgndDay Color bkgnd day
16 DWORD acrCustClrBkgndDay Array custom for color bkgnd day
33 WCHAR g_szLicense License
BYTE g_nReviewAccel Review speed
bool g_bGPSID Bluetooth (1) / Serial (0)
signed char g_nPuerto Port number, -1 for none.
signed char g_nBaudios Baude (see list in control), -1 for none
float g_fZoom Ignore, don’t change it.
double g_dSpeedUmbral Speed threshold
float g_nDistanceUmbral Distance threshold
double g_dHDOPUmbral HDOP threshold
BYTE g_bEscalaTractor Ignore, don’t change it.
DWORD rgbCurrentText Color text
16 DWORD acrCustClrText Array custom for color text
bool g_bDibujarTractor Draw tractor (1) / Don’t draw (0)
bool g_bShowGuideNumber Draw guide number (1) / Don’t it (0)
BYTE g_bUnits Metric / US Units
BYTE g_bIdioma Ignore, don’t change it.
float g_fAnchoTrabajo Width tool, in centimeter
bool g_bAutoSNOFF SN option, you can ignore it (don’t change it)
bool g_bAutoSBASON SN option, you can ignore it (don’t change it)
int g_nXOffset In decimeter
int g_nYOffset In decimeter
BYTE g_bGIFType Index for type of picture (tractor, craft)
int len Length of next string
len WCHAR g_szBTDevice BT device name
BYTE g_bDaySettings Day (1) / Night (0)
DWORD rgbCurrentTrackNight Color track night
16 DWORD acrCustClrTrackNight Array custom for color track night
DWORD rgbCurrentBkgndNight Color bkgnd night
16 DWORD acrCustClrBkgndNight Array custom for color bkgnd night |