#ifndef WITCOMMAND_H #define WITCOMMAND_H /* KEY */ #define KEY_UNLOCK 0xB588 /* SAVE */ #define SAVE_PARAM 0x00 #define SAVE_SWRST 0xFF /* algorithm */ enum ALGROITHM_ENUM { ALGROITHM9 = 0, ALGROITHM6 = 1 }; /* ORIENT */ enum ORIENT_ENUM { ORIENT_HORIZONTAL = 0, ORIENT_VERTICAL }; /* ORIENT */ enum POWONSEND_ENUM { CLOSE = 0, OPEN }; /* CALSW */ enum CAL_ENUM { EXIT = 0, GYROACC, MAGNETIC, ALTITUDE, ALANGLEZ }; #define EXITCAL 0x00 #define CALGYROACC 0x01 #define CALMAG 0x02 #define CALALTITUDE 0x03 #define CALANGLEZ 0x04 /* time zone */ enum TIMEZONE_ENUM { UTC_N12 = 0, UTC_N11, UTC_N10, UTC_N9, UTC_N8, UTC_N7, UTC_N6, UTC_N5, UTC_N4, UTC_N3, UTC_N2, UTC_N1, UTC, UTC_P1, UTC_P2, UTC_P3, UTC_P4, UTC_P5, UTC_P6, UTC_P7, UTC_P8,//default UTC_P9, UTC_P10, UTC_P11, UTC_P12 }; /* RETURN CONTENT */ #define SetBit(VAR, Place) (VAR |= (1 << Place)) #define ClrBit(VAR, Place) (VAR &= ((1 << Place) ^ 255)) enum RETURN_CONTENT_ENUM { //低位 TIME = 0, ACCELERATION, ANGULAR_VELOCITY, EULER_ANGLE, MAGNETIC_FIELD, PORT_STATUS, ATMOSPHERIC_PRESSURE_ALTITUDE, LATITUDE_LONGITUDE, //高位 GROUND_VELOCITY, QUATERNION,//四元数 SATELLITE_ACCURACY }; struct RETURN_CONTENT_STRUCT { //低位 bool time = false; bool acceleration = true; bool angular_velocity = true; bool euler_angle = true; bool magnetic_field = true; bool port_status = false; bool atmospheric_pressure_altitude = false; bool latitude_longitude = true; //高位 bool ground_velocity = false; bool quaternion = false; bool satellite_accuracy = false; }; /* BAUD */ enum BAUD_ENUM { WIT_BAUD_2400 = 0, WIT_BAUD_4800, WIT_BAUD_9600,//default WIT_BAUD_19200, WIT_BAUD_38400, WIT_BAUD_57600, WIT_BAUD_115200, WIT_BAUD_230400, WIT_BAUD_460800, WIT_BAUD_921600 }; /**RRATE*****/ enum RRATE_ENUM { RRATE_01HZ = 1, RRATE_05HZ, RRATE_1HZ, RRATE_2HZ, RRATE_5HZ, RRATE_10HZ,//default RRATE_20HZ, RRATE_50HZ, RRATE_100HZ, RRATE_NONE,//保留 RRATE_200HZ, RRATE_ONCE }; /* 端口模式 */ enum MODEL_D0_D2_D3_ENUM { AIN = 0,//default DIN, DOH, DOL, PWM }; enum MODEL_D1_ENUM { AIN_D1 = 0,//default DIN_D1, DOH_D1, DOL_D1, PWM_D1, CLR_D1 }; #endif // WITCOMMAND_H