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
Diff: ROBOFRIEN_GUI/ROBOFRIEN_GUI.h
- Revision:
- 0:3473b92e991e
- Child:
- 1:9530746906b6
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ROBOFRIEN_GUI/ROBOFRIEN_GUI.h Tue Jun 12 01:05:50 2018 +0000 @@ -0,0 +1,80 @@ + +#ifndef MBED_ROBOFRIEN_GUI_H +#define MBED_ROBOFRIEN_GUI_H + +#include "mbed.h" + + + +class ROBOFRIEN_GUI { +public: + void pc_ascii_trans(char*); + void pc_rx_update(); + bool rx_bool(); + void Init(); + void Refresh(); +///////////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////// [H/M] HomePoint and Marker ////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////////////////////////// + signed long Homepoint_Lat, Homepoint_Lng, Homepoint_Alt; + signed long Marker_Mode[20],Marker_Lat[20], Marker_Lng[20], Marker_Alt[20], Marker_Speed[20]; +///////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////// [M/S] Mode and State /////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////////////////////////// + int8_t Mode1, Mode2,MissionState,CurrentMarker; + uint8_t Bat1,Bat2; + bool button[5]; +///////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////// [GPS] GPS ////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////////////////////////// + unsigned long utc_time; + signed long latitude,longitude,altitude; + uint8_t SatNum; + +///////////////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////// AHRS ////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////////////////////////// + int32_t rollx100, pitchx100, yawx100; + int32_t roll_ratex100, pitch_ratex100, yaw_ratex100; + int32_t VXx100,VYx100,VZx100; + +///////////////////////////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////// [C/P] CAP/PWM //////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////////////////////////// + int16_t cap[8]; + uint8_t pwm[8]; + +///////////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////// [E/D] Extra & Debug ///////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////////////////////////// + uint16_t DEBUGx100[8]; + + + +///////////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////// Configuration /////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////////////////////////// + uint8_t headlight_period, headlight_dutyrate, sidelight_period, sidelight_dutyrate; + int16_t raw_cap[8]; + int16_t cap_min[8], cap_neu[8], cap_max[8]; + int motor_min[4]; + uint8_t Compass_Calibration_Mode; + bool attitude_configuration_bool; + float declination_angle; + int16_t limit_rollx100, limit_pitchx100; + int32_t limit_roll_rate, limit_pitch_rate, limit_yaw_rate; + int gain_px100[20], gain_dx100[20], gain_ix100[20]; + float mag_x_avg,mag_y_avg,mag_z_avg; +// float calibrate_gap_roll,calibrate_gap_pitch; + float cal_accel_bias[3]; + uint8_t DPN_Info; + int pwm_info[4]; + void attitude_calibrate(float , float , float); + void write_compass_setting_to_eeprom(); + void trans_flight_data(int id_dest, int data_parse_num); +private: + void trans_configuration_data(int id_dest, int data_parse_num, int data_parse_detail_num); + void trans_empty_data(int id_dest, int data_parse_num); +}; + +#endif \ No newline at end of file