Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed BufferedSerial ConfigFile
ROBOFRIEN_GUI.h
00001 00002 #ifndef MBED_ROBOFRIEN_GUI_H 00003 #define MBED_ROBOFRIEN_GUI_H 00004 00005 #include "mbed.h" 00006 00007 00008 00009 class ROBOFRIEN_GUI { 00010 public: 00011 void pc_rx_update(); 00012 bool rx_bool(); 00013 void Init(); 00014 void Refresh(); 00015 void SET_DATA(); 00016 ///////////////////////////////////////////////////////////////////////////////////////////////////////// 00017 /////////////////////////////////////// [H/M] HomePoint and Marker ////////////////////////////////////// 00018 ///////////////////////////////////////////////////////////////////////////////////////////////////////// 00019 signed long Homepoint_Lat, Homepoint_Lng, Homepoint_Alt; 00020 signed long Marker_Mode[20],Marker_Lat[20], Marker_Lng[20], Marker_Alt[20], Marker_Speed[20]; 00021 signed long Controller_Joystick[4], Gimbal_Joystick[3]; 00022 ///////////////////////////////////////////////////////////////////////////////////////////////////////// 00023 //////////////////////////////////////////// [M/S] Mode and State /////////////////////////////////////// 00024 ///////////////////////////////////////////////////////////////////////////////////////////////////////// 00025 int8_t Mode1, Alarm,MissionState,CurrentMarker; 00026 uint8_t Bat1; 00027 bool button[5]; 00028 ///////////////////////////////////////////////////////////////////////////////////////////////////////// 00029 //////////////////////////////////////////////// [GPS] GPS ////////////////////////////////////////////// 00030 ///////////////////////////////////////////////////////////////////////////////////////////////////////// 00031 unsigned long utc_time; 00032 signed long latitude,longitude,altitude; 00033 uint8_t SatNum; 00034 00035 ///////////////////////////////////////////////////////////////////////////////////////////////////////// 00036 ///////////////////////////////////////////////// AHRS ////////////////////////////////////////////////// 00037 ///////////////////////////////////////////////////////////////////////////////////////////////////////// 00038 int32_t rollx100, pitchx100, yawx100; 00039 int32_t roll_ratex100, pitch_ratex100, yaw_ratex100; 00040 int32_t VXx100,VYx100,VZx100; 00041 00042 ///////////////////////////////////////////////////////////////////////////////////////////////////////// 00043 ////////////////////////////////////////////// [C/P] CAP/PWM //////////////////////////////////////////// 00044 ///////////////////////////////////////////////////////////////////////////////////////////////////////// 00045 int16_t cap[8]; 00046 uint8_t pwm[8]; 00047 00048 ///////////////////////////////////////////////////////////////////////////////////////////////////////// 00049 /////////////////////////////////////////// [E/D] Extra & Debug ///////////////////////////////////////// 00050 ///////////////////////////////////////////////////////////////////////////////////////////////////////// 00051 int32_t DEBUGx100[8]; 00052 00053 00054 00055 ///////////////////////////////////////////////////////////////////////////////////////////////////////// 00056 /////////////////////////////////////////// Configuration /////////////////////////////////////////////// 00057 ///////////////////////////////////////////////////////////////////////////////////////////////////////// 00058 uint8_t headlight_period, headlight_dutyrate, sidelight_period, sidelight_dutyrate; 00059 int16_t raw_cap[8]; 00060 int16_t cap_min[8], cap_neu[8], cap_max[8]; 00061 int motor_min[6]; 00062 uint8_t Compass_Calibration_Mode; 00063 bool attitude_configuration_bool; 00064 float declination_angle; 00065 int16_t limit_rollx100, limit_pitchx100; 00066 int32_t limit_roll_ratex100, limit_pitch_ratex100, limit_yaw_ratex100; 00067 int gain_px100[20], gain_dx100[20], gain_ix100[20]; 00068 float mag_x_avg,mag_y_avg,mag_z_avg; 00069 // float calibrate_gap_roll,calibrate_gap_pitch; 00070 float cal_accel_bias[3]; 00071 uint8_t DPN_Info; 00072 int pwm_info[6]; 00073 void attitude_calibrate(float , float , float); 00074 void write_compass_setting_to_eeprom(); 00075 void trans_flight_data(int id_dest, int data_parse_num); 00076 void trans_configuration_data(int id_dest, int data_parse_num, int data_parse_detail_num); 00077 void Trans(); 00078 void TRANS_BUFFER(); 00079 long MarkerChksum; 00080 private: 00081 bool eeprom_refresh_bool; 00082 void trans_empty_data(int id_dest, int data_parse_num); 00083 bool TRANS_BUFFER_BUSY; 00084 uint8_t TRANS_BUF[100],TRANS_BUF_LEN,TRANS_BUF_CNT; 00085 int HomePointChksum; 00086 }; 00087 00088 #endif
Generated on Sat Jul 16 2022 14:19:21 by
 1.7.2
 1.7.2