📄 gps_gui.c
字号:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h> /*Unix标准函数定义*/
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <termios.h>
#include <math.h>
#include <time.h>
#include <errno.h>
#include <minigui/common.h>
#include <minigui/minigui.h>
#include <minigui/gdi.h>
#include <minigui/window.h>
#include <minigui/control.h>
#define page_1 1
#define page_2 2
#define page_3 3
#define page_4 4
#define IDC_GPSPROPSHEET 200
#define IDC_GPSINFO 200
#define IDC_FIXED 201
#define IDC_PROGRESS 200
#define IDC_num_01 300 //卫星编号标志
#define IDC_LONGITUDE1 500
#define IDC_LATITUDE1 313
#define IDC_ALTITUDE1 314
#define IDC_LONGITUDE_NUM1 315
#define IDC_LATITUDE_NUM1 316
#define IDC_ALTITUDE_NUM1 317
//已经用到IDC_LONGITUDE1+15了
#define IDC_signal 320
#define IDC_yposition_satellite 340
#define IDC_nposition_satellite 360
#define IDC_num_sate_page2 380
#define IDC_useable_satellit 400
#define IDC_NORTH 420
#define Pi 3.14
#define FALSE 0
#define TRUE 1
//volatile int STOP=FALSE;
//#define BAUDRATE B9600
//#define MODEMDEVICE "/dev/ttyS1"
#define _POSIX_SOURCE 1 /* POSIX系统兼容*/
/***********************************************************************************/
//第三页内的
HDC hdc_page3;
HWND hDlg3; //第三页句柄,用于向第三页发送MSG_PAINT
//第二页内的
HWND hyposition_satellitewnd[12];//第二页中12卫星的位置,可用
HWND hnposition_satellitewnd[12];//不可用
HWND hnum_sate_page2wnd[12];//卫星编号
//第一页内的
HWND hfix_timewnd;//定位时间
HWND hviewwnd;//satellite in view
HWND husedwnd;//satellite used in fix
HWND hlongitudewnd1; //经度纬度高度
HWND hlatitudewnd1;
HWND haltitudewnd1;
HWND hlongitude_numwnd1; //数值
HWND hlatitude_numwnd1;
HWND haltitude_numwnd1;
HWND huseable_satellitewnd[12];
HWND hnum_satellitewnd[12];//卫星编号控件的句柄
HWND hsingnal_satellitewnd[12];//卫星信号强度句柄
HWND hprogresswnd[12]; //12个进度条句柄
//最外边的
HWND hfixedwnd;
/******************************************************************/
struct state_struct
{
char longitude[12]; //经度
char latitude[11]; //纬度
char altitude[6]; //高度
char speed[12]; //速度
float speed_num; //速度的数字表示
float heading; //前进方向
}statenow={"000
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -