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@0:3473b92e991e, 2018-06-12 (annotated)
- Committer:
- skyyoungsik
- Date:
- Tue Jun 12 01:05:50 2018 +0000
- Revision:
- 0:3473b92e991e
- Child:
- 1:9530746906b6
lkj;
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_ascii_trans(char*); |
skyyoungsik | 0:3473b92e991e | 12 | void pc_rx_update(); |
skyyoungsik | 0:3473b92e991e | 13 | bool rx_bool(); |
skyyoungsik | 0:3473b92e991e | 14 | void Init(); |
skyyoungsik | 0:3473b92e991e | 15 | void Refresh(); |
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 | 0:3473b92e991e | 21 | ///////////////////////////////////////////////////////////////////////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 22 | //////////////////////////////////////////// [M/S] Mode and State /////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 23 | ///////////////////////////////////////////////////////////////////////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 24 | int8_t Mode1, Mode2,MissionState,CurrentMarker; |
skyyoungsik | 0:3473b92e991e | 25 | uint8_t Bat1,Bat2; |
skyyoungsik | 0:3473b92e991e | 26 | bool button[5]; |
skyyoungsik | 0:3473b92e991e | 27 | ///////////////////////////////////////////////////////////////////////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 28 | //////////////////////////////////////////////// [GPS] GPS ////////////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 29 | ///////////////////////////////////////////////////////////////////////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 30 | unsigned long utc_time; |
skyyoungsik | 0:3473b92e991e | 31 | signed long latitude,longitude,altitude; |
skyyoungsik | 0:3473b92e991e | 32 | uint8_t SatNum; |
skyyoungsik | 0:3473b92e991e | 33 | |
skyyoungsik | 0:3473b92e991e | 34 | ///////////////////////////////////////////////////////////////////////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 35 | ///////////////////////////////////////////////// AHRS ////////////////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 36 | ///////////////////////////////////////////////////////////////////////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 37 | int32_t rollx100, pitchx100, yawx100; |
skyyoungsik | 0:3473b92e991e | 38 | int32_t roll_ratex100, pitch_ratex100, yaw_ratex100; |
skyyoungsik | 0:3473b92e991e | 39 | int32_t VXx100,VYx100,VZx100; |
skyyoungsik | 0:3473b92e991e | 40 | |
skyyoungsik | 0:3473b92e991e | 41 | ///////////////////////////////////////////////////////////////////////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 42 | ////////////////////////////////////////////// [C/P] CAP/PWM //////////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 43 | ///////////////////////////////////////////////////////////////////////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 44 | int16_t cap[8]; |
skyyoungsik | 0:3473b92e991e | 45 | uint8_t pwm[8]; |
skyyoungsik | 0:3473b92e991e | 46 | |
skyyoungsik | 0:3473b92e991e | 47 | ///////////////////////////////////////////////////////////////////////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 48 | /////////////////////////////////////////// [E/D] Extra & Debug ///////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 49 | ///////////////////////////////////////////////////////////////////////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 50 | uint16_t DEBUGx100[8]; |
skyyoungsik | 0:3473b92e991e | 51 | |
skyyoungsik | 0:3473b92e991e | 52 | |
skyyoungsik | 0:3473b92e991e | 53 | |
skyyoungsik | 0:3473b92e991e | 54 | ///////////////////////////////////////////////////////////////////////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 55 | /////////////////////////////////////////// Configuration /////////////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 56 | ///////////////////////////////////////////////////////////////////////////////////////////////////////// |
skyyoungsik | 0:3473b92e991e | 57 | uint8_t headlight_period, headlight_dutyrate, sidelight_period, sidelight_dutyrate; |
skyyoungsik | 0:3473b92e991e | 58 | int16_t raw_cap[8]; |
skyyoungsik | 0:3473b92e991e | 59 | int16_t cap_min[8], cap_neu[8], cap_max[8]; |
skyyoungsik | 0:3473b92e991e | 60 | int motor_min[4]; |
skyyoungsik | 0:3473b92e991e | 61 | uint8_t Compass_Calibration_Mode; |
skyyoungsik | 0:3473b92e991e | 62 | bool attitude_configuration_bool; |
skyyoungsik | 0:3473b92e991e | 63 | float declination_angle; |
skyyoungsik | 0:3473b92e991e | 64 | int16_t limit_rollx100, limit_pitchx100; |
skyyoungsik | 0:3473b92e991e | 65 | int32_t limit_roll_rate, limit_pitch_rate, limit_yaw_rate; |
skyyoungsik | 0:3473b92e991e | 66 | int gain_px100[20], gain_dx100[20], gain_ix100[20]; |
skyyoungsik | 0:3473b92e991e | 67 | float mag_x_avg,mag_y_avg,mag_z_avg; |
skyyoungsik | 0:3473b92e991e | 68 | // float calibrate_gap_roll,calibrate_gap_pitch; |
skyyoungsik | 0:3473b92e991e | 69 | float cal_accel_bias[3]; |
skyyoungsik | 0:3473b92e991e | 70 | uint8_t DPN_Info; |
skyyoungsik | 0:3473b92e991e | 71 | int pwm_info[4]; |
skyyoungsik | 0:3473b92e991e | 72 | void attitude_calibrate(float , float , float); |
skyyoungsik | 0:3473b92e991e | 73 | void write_compass_setting_to_eeprom(); |
skyyoungsik | 0:3473b92e991e | 74 | void trans_flight_data(int id_dest, int data_parse_num); |
skyyoungsik | 0:3473b92e991e | 75 | private: |
skyyoungsik | 0:3473b92e991e | 76 | void trans_configuration_data(int id_dest, int data_parse_num, int data_parse_detail_num); |
skyyoungsik | 0:3473b92e991e | 77 | void trans_empty_data(int id_dest, int data_parse_num); |
skyyoungsik | 0:3473b92e991e | 78 | }; |
skyyoungsik | 0:3473b92e991e | 79 | |
skyyoungsik | 0:3473b92e991e | 80 | #endif |