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/ROBOFRIEN_GUI.h@1:9530746906b6, 2018-11-28 (annotated)
- Committer:
- skyyoungsik
- Date:
- Wed Nov 28 13:06:23 2018 +0000
- Revision:
- 1:9530746906b6
- Parent:
- 0:3473b92e991e
test1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
skyyoungsik | 0:3473b92e991e | 1 | |
skyyoungsik | 0:3473b92e991e | 2 | #ifndef MBED_ROBOFRIEN_GUI_H |
skyyoungsik | 0:3473b92e991e | 3 | #define MBED_ROBOFRIEN_GUI_H |
skyyoungsik | 0:3473b92e991e | 4 | |
skyyoungsik | 0:3473b92e991e | 5 | #include "mbed.h" |
skyyoungsik | 0:3473b92e991e | 6 | |
skyyoungsik | 0:3473b92e991e | 7 | |
skyyoungsik | 0:3473b92e991e | 8 | |
skyyoungsik | 0:3473b92e991e | 9 | class ROBOFRIEN_GUI { |
skyyoungsik | 0:3473b92e991e | 10 | public: |
skyyoungsik | 0:3473b92e991e | 11 | void pc_rx_update(); |
skyyoungsik | 0:3473b92e991e | 12 | bool rx_bool(); |
skyyoungsik | 0:3473b92e991e | 13 | void Init(); |
skyyoungsik | 0:3473b92e991e | 14 | void Refresh(); |
skyyoungsik | 1:9530746906b6 | 15 | void SET_DATA(); |
skyyoungsik | 0:3473b92e991e | 16 | ///////////////////////////////////////////////////////////////////////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 17 | /////////////////////////////////////// [H/M] HomePoint and Marker ////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 18 | ///////////////////////////////////////////////////////////////////////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 19 | signed long Homepoint_Lat, Homepoint_Lng, Homepoint_Alt; |
skyyoungsik | 0:3473b92e991e | 20 | signed long Marker_Mode[20],Marker_Lat[20], Marker_Lng[20], Marker_Alt[20], Marker_Speed[20]; |
skyyoungsik | 1:9530746906b6 | 21 | signed long Controller_Joystick[4], Gimbal_Joystick[3]; |
skyyoungsik | 0:3473b92e991e | 22 | ///////////////////////////////////////////////////////////////////////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 23 | //////////////////////////////////////////// [M/S] Mode and State /////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 24 | ///////////////////////////////////////////////////////////////////////////////////////////////////////// |
skyyoungsik | 1:9530746906b6 | 25 | int8_t Mode1, Alarm,MissionState,CurrentMarker; |
skyyoungsik | 1:9530746906b6 | 26 | uint8_t Bat1; |
skyyoungsik | 0:3473b92e991e | 27 | bool button[5]; |
skyyoungsik | 0:3473b92e991e | 28 | ///////////////////////////////////////////////////////////////////////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 29 | //////////////////////////////////////////////// [GPS] GPS ////////////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 30 | ///////////////////////////////////////////////////////////////////////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 31 | unsigned long utc_time; |
skyyoungsik | 0:3473b92e991e | 32 | signed long latitude,longitude,altitude; |
skyyoungsik | 0:3473b92e991e | 33 | uint8_t SatNum; |
skyyoungsik | 0:3473b92e991e | 34 | |
skyyoungsik | 0:3473b92e991e | 35 | ///////////////////////////////////////////////////////////////////////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 36 | ///////////////////////////////////////////////// AHRS ////////////////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 37 | ///////////////////////////////////////////////////////////////////////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 38 | int32_t rollx100, pitchx100, yawx100; |
skyyoungsik | 0:3473b92e991e | 39 | int32_t roll_ratex100, pitch_ratex100, yaw_ratex100; |
skyyoungsik | 0:3473b92e991e | 40 | int32_t VXx100,VYx100,VZx100; |
skyyoungsik | 0:3473b92e991e | 41 | |
skyyoungsik | 0:3473b92e991e | 42 | ///////////////////////////////////////////////////////////////////////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 43 | ////////////////////////////////////////////// [C/P] CAP/PWM //////////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 44 | ///////////////////////////////////////////////////////////////////////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 45 | int16_t cap[8]; |
skyyoungsik | 0:3473b92e991e | 46 | uint8_t pwm[8]; |
skyyoungsik | 0:3473b92e991e | 47 | |
skyyoungsik | 0:3473b92e991e | 48 | ///////////////////////////////////////////////////////////////////////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 49 | /////////////////////////////////////////// [E/D] Extra & Debug ///////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 50 | ///////////////////////////////////////////////////////////////////////////////////////////////////////// |
skyyoungsik | 1:9530746906b6 | 51 | int32_t DEBUGx100[8]; |
skyyoungsik | 0:3473b92e991e | 52 | |
skyyoungsik | 0:3473b92e991e | 53 | |
skyyoungsik | 0:3473b92e991e | 54 | |
skyyoungsik | 0:3473b92e991e | 55 | ///////////////////////////////////////////////////////////////////////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 56 | /////////////////////////////////////////// Configuration /////////////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 57 | ///////////////////////////////////////////////////////////////////////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 58 | uint8_t headlight_period, headlight_dutyrate, sidelight_period, sidelight_dutyrate; |
skyyoungsik | 0:3473b92e991e | 59 | int16_t raw_cap[8]; |
skyyoungsik | 0:3473b92e991e | 60 | int16_t cap_min[8], cap_neu[8], cap_max[8]; |
skyyoungsik | 1:9530746906b6 | 61 | int motor_min[6]; |
skyyoungsik | 0:3473b92e991e | 62 | uint8_t Compass_Calibration_Mode; |
skyyoungsik | 0:3473b92e991e | 63 | bool attitude_configuration_bool; |
skyyoungsik | 0:3473b92e991e | 64 | float declination_angle; |
skyyoungsik | 0:3473b92e991e | 65 | int16_t limit_rollx100, limit_pitchx100; |
skyyoungsik | 1:9530746906b6 | 66 | int32_t limit_roll_ratex100, limit_pitch_ratex100, limit_yaw_ratex100; |
skyyoungsik | 0:3473b92e991e | 67 | int gain_px100[20], gain_dx100[20], gain_ix100[20]; |
skyyoungsik | 0:3473b92e991e | 68 | float mag_x_avg,mag_y_avg,mag_z_avg; |
skyyoungsik | 0:3473b92e991e | 69 | // float calibrate_gap_roll,calibrate_gap_pitch; |
skyyoungsik | 0:3473b92e991e | 70 | float cal_accel_bias[3]; |
skyyoungsik | 0:3473b92e991e | 71 | uint8_t DPN_Info; |
skyyoungsik | 1:9530746906b6 | 72 | int pwm_info[6]; |
skyyoungsik | 0:3473b92e991e | 73 | void attitude_calibrate(float , float , float); |
skyyoungsik | 0:3473b92e991e | 74 | void write_compass_setting_to_eeprom(); |
skyyoungsik | 0:3473b92e991e | 75 | void trans_flight_data(int id_dest, int data_parse_num); |
skyyoungsik | 1:9530746906b6 | 76 | void trans_configuration_data(int id_dest, int data_parse_num, int data_parse_detail_num); |
skyyoungsik | 1:9530746906b6 | 77 | void Trans(); |
skyyoungsik | 1:9530746906b6 | 78 | void TRANS_BUFFER(); |
skyyoungsik | 1:9530746906b6 | 79 | long MarkerChksum; |
skyyoungsik | 0:3473b92e991e | 80 | private: |
skyyoungsik | 1:9530746906b6 | 81 | bool eeprom_refresh_bool; |
skyyoungsik | 0:3473b92e991e | 82 | void trans_empty_data(int id_dest, int data_parse_num); |
skyyoungsik | 1:9530746906b6 | 83 | bool TRANS_BUFFER_BUSY; |
skyyoungsik | 1:9530746906b6 | 84 | uint8_t TRANS_BUF[100],TRANS_BUF_LEN,TRANS_BUF_CNT; |
skyyoungsik | 1:9530746906b6 | 85 | int HomePointChksum; |
skyyoungsik | 0:3473b92e991e | 86 | }; |
skyyoungsik | 0:3473b92e991e | 87 | |
skyyoungsik | 0:3473b92e991e | 88 | #endif |