📄 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>#include <fhas2/fhas2.h>#include "fh.h"#include "serialport.h"#include <sys/ioctl.h>#include <sys/mman.h>#include "gpio_drv.h" #define DEVICE_GPIODRV "/dev/gpio"#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_ISHASDATA 202#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#define IDC_START 520#define IDC_END 521//#define _DEBUG#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 Pi 3.14//#define FALSE 0//#define TRUE 1//#define _POSIX_SOURCE 1 /* POSIX系统兼容*/static int fdgpio; // R by cx/***********************************************************************************///第三页内的//static HDC hdc_page3;//static HWND hDlg3; //第三页句柄,用于向第三页发送MSG_PAINT//第二页内的static HWND hyposition_satellitewnd[12];//第二页中12卫星的位置,可用static HWND hnposition_satellitewnd[12];//不可用static HWND hnum_sate_page2wnd[12];//卫星编号//第一页内的static HWND hfix_timewnd;//定位时间static HWND hviewwnd;//satellite in viewstatic HWND husedwnd;//satellite used in fixstatic HWND hlongitudewnd1; //经度纬度高度static HWND hlatitudewnd1;static HWND haltitudewnd1;static HWND hlongitude_numwnd1; //数值static HWND hlatitude_numwnd1;static HWND haltitude_numwnd1;static HWND huseable_satellitewnd[12];static HWND hnum_satellitewnd[12];//卫星编号控件的句柄static HWND hsingnal_satellitewnd[12];//卫星信号强度句柄static HWND hprogresswnd[12]; //12个进度条句柄//最外边的static HWND hfixedwnd; static HWND hishasdata; static HWND gpshwnd;/******************************************************************/static 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 + -