├── .gitignore
├── .gitmodules
├── LICENSE
├── README.md
├── app
├── .gitignore
├── build.gradle.kts
├── mavlink
│ ├── .gitignore
│ ├── build.gradle.kts
│ ├── consumer-rules.pro
│ ├── proguard-rules.pro
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── geehe
│ │ │ └── mavlink
│ │ │ └── ExampleInstrumentedTest.java
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── cpp
│ │ │ ├── CMakeLists.txt
│ │ │ ├── mavlink.cpp
│ │ │ ├── mavlink.h
│ │ │ └── mavlink
│ │ │ │ ├── ASLUAV
│ │ │ │ ├── ASLUAV.h
│ │ │ │ ├── mavlink.h
│ │ │ │ ├── mavlink_msg_asl_obctrl.h
│ │ │ │ ├── mavlink_msg_aslctrl_data.h
│ │ │ │ ├── mavlink_msg_aslctrl_debug.h
│ │ │ │ ├── mavlink_msg_asluav_status.h
│ │ │ │ ├── mavlink_msg_command_int_stamped.h
│ │ │ │ ├── mavlink_msg_command_long_stamped.h
│ │ │ │ ├── mavlink_msg_ekf_ext.h
│ │ │ │ ├── mavlink_msg_fw_soaring_data.h
│ │ │ │ ├── mavlink_msg_gsm_link_status.h
│ │ │ │ ├── mavlink_msg_sens_atmos.h
│ │ │ │ ├── mavlink_msg_sens_batmon.h
│ │ │ │ ├── mavlink_msg_sens_mppt.h
│ │ │ │ ├── mavlink_msg_sens_power.h
│ │ │ │ ├── mavlink_msg_sens_power_board.h
│ │ │ │ ├── mavlink_msg_sensorpod_status.h
│ │ │ │ ├── testsuite.h
│ │ │ │ └── version.h
│ │ │ │ ├── ardupilotmega
│ │ │ │ ├── ardupilotmega.h
│ │ │ │ ├── mavlink.h
│ │ │ │ ├── mavlink_msg_adap_tuning.h
│ │ │ │ ├── mavlink_msg_ahrs.h
│ │ │ │ ├── mavlink_msg_ahrs2.h
│ │ │ │ ├── mavlink_msg_ahrs3.h
│ │ │ │ ├── mavlink_msg_airspeed_autocal.h
│ │ │ │ ├── mavlink_msg_aoa_ssa.h
│ │ │ │ ├── mavlink_msg_ap_adc.h
│ │ │ │ ├── mavlink_msg_autopilot_version_request.h
│ │ │ │ ├── mavlink_msg_battery2.h
│ │ │ │ ├── mavlink_msg_camera_feedback.h
│ │ │ │ ├── mavlink_msg_camera_status.h
│ │ │ │ ├── mavlink_msg_compassmot_status.h
│ │ │ │ ├── mavlink_msg_data16.h
│ │ │ │ ├── mavlink_msg_data32.h
│ │ │ │ ├── mavlink_msg_data64.h
│ │ │ │ ├── mavlink_msg_data96.h
│ │ │ │ ├── mavlink_msg_deepstall.h
│ │ │ │ ├── mavlink_msg_device_op_read.h
│ │ │ │ ├── mavlink_msg_device_op_read_reply.h
│ │ │ │ ├── mavlink_msg_device_op_write.h
│ │ │ │ ├── mavlink_msg_device_op_write_reply.h
│ │ │ │ ├── mavlink_msg_digicam_configure.h
│ │ │ │ ├── mavlink_msg_digicam_control.h
│ │ │ │ ├── mavlink_msg_ekf_status_report.h
│ │ │ │ ├── mavlink_msg_esc_telemetry_1_to_4.h
│ │ │ │ ├── mavlink_msg_esc_telemetry_5_to_8.h
│ │ │ │ ├── mavlink_msg_esc_telemetry_9_to_12.h
│ │ │ │ ├── mavlink_msg_fence_fetch_point.h
│ │ │ │ ├── mavlink_msg_fence_point.h
│ │ │ │ ├── mavlink_msg_fence_status.h
│ │ │ │ ├── mavlink_msg_gimbal_control.h
│ │ │ │ ├── mavlink_msg_gimbal_report.h
│ │ │ │ ├── mavlink_msg_gimbal_torque_cmd_report.h
│ │ │ │ ├── mavlink_msg_gopro_get_request.h
│ │ │ │ ├── mavlink_msg_gopro_get_response.h
│ │ │ │ ├── mavlink_msg_gopro_heartbeat.h
│ │ │ │ ├── mavlink_msg_gopro_set_request.h
│ │ │ │ ├── mavlink_msg_gopro_set_response.h
│ │ │ │ ├── mavlink_msg_hwstatus.h
│ │ │ │ ├── mavlink_msg_led_control.h
│ │ │ │ ├── mavlink_msg_limits_status.h
│ │ │ │ ├── mavlink_msg_mag_cal_progress.h
│ │ │ │ ├── mavlink_msg_mag_cal_report.h
│ │ │ │ ├── mavlink_msg_meminfo.h
│ │ │ │ ├── mavlink_msg_mount_configure.h
│ │ │ │ ├── mavlink_msg_mount_control.h
│ │ │ │ ├── mavlink_msg_mount_status.h
│ │ │ │ ├── mavlink_msg_pid_tuning.h
│ │ │ │ ├── mavlink_msg_radio.h
│ │ │ │ ├── mavlink_msg_rally_fetch_point.h
│ │ │ │ ├── mavlink_msg_rally_point.h
│ │ │ │ ├── mavlink_msg_rangefinder.h
│ │ │ │ ├── mavlink_msg_remote_log_block_status.h
│ │ │ │ ├── mavlink_msg_remote_log_data_block.h
│ │ │ │ ├── mavlink_msg_rpm.h
│ │ │ │ ├── mavlink_msg_sensor_offsets.h
│ │ │ │ ├── mavlink_msg_set_mag_offsets.h
│ │ │ │ ├── mavlink_msg_simstate.h
│ │ │ │ ├── mavlink_msg_vision_position_delta.h
│ │ │ │ ├── mavlink_msg_wind.h
│ │ │ │ ├── testsuite.h
│ │ │ │ └── version.h
│ │ │ │ ├── autoquad
│ │ │ │ ├── autoquad.h
│ │ │ │ ├── mavlink.h
│ │ │ │ ├── mavlink_msg_aq_esc_telemetry.h
│ │ │ │ ├── mavlink_msg_aq_telemetry_f.h
│ │ │ │ ├── testsuite.h
│ │ │ │ └── version.h
│ │ │ │ ├── checksum.h
│ │ │ │ ├── common
│ │ │ │ ├── common.h
│ │ │ │ ├── mavlink.h
│ │ │ │ ├── mavlink_msg_actuator_control_target.h
│ │ │ │ ├── mavlink_msg_actuator_output_status.h
│ │ │ │ ├── mavlink_msg_adsb_vehicle.h
│ │ │ │ ├── mavlink_msg_ais_vessel.h
│ │ │ │ ├── mavlink_msg_altitude.h
│ │ │ │ ├── mavlink_msg_att_pos_mocap.h
│ │ │ │ ├── mavlink_msg_attitude.h
│ │ │ │ ├── mavlink_msg_attitude_quaternion.h
│ │ │ │ ├── mavlink_msg_attitude_quaternion_cov.h
│ │ │ │ ├── mavlink_msg_attitude_target.h
│ │ │ │ ├── mavlink_msg_auth_key.h
│ │ │ │ ├── mavlink_msg_autopilot_state_for_gimbal_device.h
│ │ │ │ ├── mavlink_msg_autopilot_version.h
│ │ │ │ ├── mavlink_msg_battery_status.h
│ │ │ │ ├── mavlink_msg_button_change.h
│ │ │ │ ├── mavlink_msg_camera_capture_status.h
│ │ │ │ ├── mavlink_msg_camera_fov_status.h
│ │ │ │ ├── mavlink_msg_camera_image_captured.h
│ │ │ │ ├── mavlink_msg_camera_information.h
│ │ │ │ ├── mavlink_msg_camera_settings.h
│ │ │ │ ├── mavlink_msg_camera_tracking_geo_status.h
│ │ │ │ ├── mavlink_msg_camera_tracking_image_status.h
│ │ │ │ ├── mavlink_msg_camera_trigger.h
│ │ │ │ ├── mavlink_msg_can_filter_modify.h
│ │ │ │ ├── mavlink_msg_can_frame.h
│ │ │ │ ├── mavlink_msg_canfd_frame.h
│ │ │ │ ├── mavlink_msg_cellular_config.h
│ │ │ │ ├── mavlink_msg_cellular_status.h
│ │ │ │ ├── mavlink_msg_change_operator_control.h
│ │ │ │ ├── mavlink_msg_change_operator_control_ack.h
│ │ │ │ ├── mavlink_msg_collision.h
│ │ │ │ ├── mavlink_msg_command_ack.h
│ │ │ │ ├── mavlink_msg_command_cancel.h
│ │ │ │ ├── mavlink_msg_command_int.h
│ │ │ │ ├── mavlink_msg_command_long.h
│ │ │ │ ├── mavlink_msg_component_information.h
│ │ │ │ ├── mavlink_msg_component_metadata.h
│ │ │ │ ├── mavlink_msg_control_system_state.h
│ │ │ │ ├── mavlink_msg_current_event_sequence.h
│ │ │ │ ├── mavlink_msg_data_stream.h
│ │ │ │ ├── mavlink_msg_data_transmission_handshake.h
│ │ │ │ ├── mavlink_msg_debug.h
│ │ │ │ ├── mavlink_msg_debug_float_array.h
│ │ │ │ ├── mavlink_msg_debug_vect.h
│ │ │ │ ├── mavlink_msg_distance_sensor.h
│ │ │ │ ├── mavlink_msg_efi_status.h
│ │ │ │ ├── mavlink_msg_encapsulated_data.h
│ │ │ │ ├── mavlink_msg_esc_info.h
│ │ │ │ ├── mavlink_msg_esc_status.h
│ │ │ │ ├── mavlink_msg_estimator_status.h
│ │ │ │ ├── mavlink_msg_event.h
│ │ │ │ ├── mavlink_msg_extended_sys_state.h
│ │ │ │ ├── mavlink_msg_fence_status.h
│ │ │ │ ├── mavlink_msg_file_transfer_protocol.h
│ │ │ │ ├── mavlink_msg_flight_information.h
│ │ │ │ ├── mavlink_msg_follow_target.h
│ │ │ │ ├── mavlink_msg_generator_status.h
│ │ │ │ ├── mavlink_msg_gimbal_device_attitude_status.h
│ │ │ │ ├── mavlink_msg_gimbal_device_information.h
│ │ │ │ ├── mavlink_msg_gimbal_device_set_attitude.h
│ │ │ │ ├── mavlink_msg_gimbal_manager_information.h
│ │ │ │ ├── mavlink_msg_gimbal_manager_set_attitude.h
│ │ │ │ ├── mavlink_msg_gimbal_manager_set_manual_control.h
│ │ │ │ ├── mavlink_msg_gimbal_manager_set_pitchyaw.h
│ │ │ │ ├── mavlink_msg_gimbal_manager_status.h
│ │ │ │ ├── mavlink_msg_global_position_int.h
│ │ │ │ ├── mavlink_msg_global_position_int_cov.h
│ │ │ │ ├── mavlink_msg_global_vision_position_estimate.h
│ │ │ │ ├── mavlink_msg_gps2_raw.h
│ │ │ │ ├── mavlink_msg_gps2_rtk.h
│ │ │ │ ├── mavlink_msg_gps_global_origin.h
│ │ │ │ ├── mavlink_msg_gps_inject_data.h
│ │ │ │ ├── mavlink_msg_gps_input.h
│ │ │ │ ├── mavlink_msg_gps_raw_int.h
│ │ │ │ ├── mavlink_msg_gps_rtcm_data.h
│ │ │ │ ├── mavlink_msg_gps_rtk.h
│ │ │ │ ├── mavlink_msg_gps_status.h
│ │ │ │ ├── mavlink_msg_heartbeat.h
│ │ │ │ ├── mavlink_msg_high_latency.h
│ │ │ │ ├── mavlink_msg_high_latency2.h
│ │ │ │ ├── mavlink_msg_highres_imu.h
│ │ │ │ ├── mavlink_msg_hil_actuator_controls.h
│ │ │ │ ├── mavlink_msg_hil_controls.h
│ │ │ │ ├── mavlink_msg_hil_gps.h
│ │ │ │ ├── mavlink_msg_hil_optical_flow.h
│ │ │ │ ├── mavlink_msg_hil_rc_inputs_raw.h
│ │ │ │ ├── mavlink_msg_hil_sensor.h
│ │ │ │ ├── mavlink_msg_hil_state.h
│ │ │ │ ├── mavlink_msg_hil_state_quaternion.h
│ │ │ │ ├── mavlink_msg_home_position.h
│ │ │ │ ├── mavlink_msg_hygrometer_sensor.h
│ │ │ │ ├── mavlink_msg_isbd_link_status.h
│ │ │ │ ├── mavlink_msg_landing_target.h
│ │ │ │ ├── mavlink_msg_link_node_status.h
│ │ │ │ ├── mavlink_msg_local_position_ned.h
│ │ │ │ ├── mavlink_msg_local_position_ned_cov.h
│ │ │ │ ├── mavlink_msg_local_position_ned_system_global_offset.h
│ │ │ │ ├── mavlink_msg_log_data.h
│ │ │ │ ├── mavlink_msg_log_entry.h
│ │ │ │ ├── mavlink_msg_log_erase.h
│ │ │ │ ├── mavlink_msg_log_request_data.h
│ │ │ │ ├── mavlink_msg_log_request_end.h
│ │ │ │ ├── mavlink_msg_log_request_list.h
│ │ │ │ ├── mavlink_msg_logging_ack.h
│ │ │ │ ├── mavlink_msg_logging_data.h
│ │ │ │ ├── mavlink_msg_logging_data_acked.h
│ │ │ │ ├── mavlink_msg_mag_cal_report.h
│ │ │ │ ├── mavlink_msg_manual_control.h
│ │ │ │ ├── mavlink_msg_manual_setpoint.h
│ │ │ │ ├── mavlink_msg_memory_vect.h
│ │ │ │ ├── mavlink_msg_message_interval.h
│ │ │ │ ├── mavlink_msg_mission_ack.h
│ │ │ │ ├── mavlink_msg_mission_clear_all.h
│ │ │ │ ├── mavlink_msg_mission_count.h
│ │ │ │ ├── mavlink_msg_mission_current.h
│ │ │ │ ├── mavlink_msg_mission_item.h
│ │ │ │ ├── mavlink_msg_mission_item_int.h
│ │ │ │ ├── mavlink_msg_mission_item_reached.h
│ │ │ │ ├── mavlink_msg_mission_request.h
│ │ │ │ ├── mavlink_msg_mission_request_int.h
│ │ │ │ ├── mavlink_msg_mission_request_list.h
│ │ │ │ ├── mavlink_msg_mission_request_partial_list.h
│ │ │ │ ├── mavlink_msg_mission_set_current.h
│ │ │ │ ├── mavlink_msg_mission_write_partial_list.h
│ │ │ │ ├── mavlink_msg_mount_orientation.h
│ │ │ │ ├── mavlink_msg_named_value_float.h
│ │ │ │ ├── mavlink_msg_named_value_int.h
│ │ │ │ ├── mavlink_msg_nav_controller_output.h
│ │ │ │ ├── mavlink_msg_obstacle_distance.h
│ │ │ │ ├── mavlink_msg_odometry.h
│ │ │ │ ├── mavlink_msg_onboard_computer_status.h
│ │ │ │ ├── mavlink_msg_open_drone_id_arm_status.h
│ │ │ │ ├── mavlink_msg_open_drone_id_authentication.h
│ │ │ │ ├── mavlink_msg_open_drone_id_basic_id.h
│ │ │ │ ├── mavlink_msg_open_drone_id_location.h
│ │ │ │ ├── mavlink_msg_open_drone_id_message_pack.h
│ │ │ │ ├── mavlink_msg_open_drone_id_operator_id.h
│ │ │ │ ├── mavlink_msg_open_drone_id_self_id.h
│ │ │ │ ├── mavlink_msg_open_drone_id_system.h
│ │ │ │ ├── mavlink_msg_open_drone_id_system_update.h
│ │ │ │ ├── mavlink_msg_optical_flow.h
│ │ │ │ ├── mavlink_msg_optical_flow_rad.h
│ │ │ │ ├── mavlink_msg_orbit_execution_status.h
│ │ │ │ ├── mavlink_msg_param_ext_ack.h
│ │ │ │ ├── mavlink_msg_param_ext_request_list.h
│ │ │ │ ├── mavlink_msg_param_ext_request_read.h
│ │ │ │ ├── mavlink_msg_param_ext_set.h
│ │ │ │ ├── mavlink_msg_param_ext_value.h
│ │ │ │ ├── mavlink_msg_param_map_rc.h
│ │ │ │ ├── mavlink_msg_param_request_list.h
│ │ │ │ ├── mavlink_msg_param_request_read.h
│ │ │ │ ├── mavlink_msg_param_set.h
│ │ │ │ ├── mavlink_msg_param_value.h
│ │ │ │ ├── mavlink_msg_ping.h
│ │ │ │ ├── mavlink_msg_play_tune.h
│ │ │ │ ├── mavlink_msg_play_tune_v2.h
│ │ │ │ ├── mavlink_msg_position_target_global_int.h
│ │ │ │ ├── mavlink_msg_position_target_local_ned.h
│ │ │ │ ├── mavlink_msg_power_status.h
│ │ │ │ ├── mavlink_msg_protocol_version.h
│ │ │ │ ├── mavlink_msg_radio_status.h
│ │ │ │ ├── mavlink_msg_raw_imu.h
│ │ │ │ ├── mavlink_msg_raw_pressure.h
│ │ │ │ ├── mavlink_msg_raw_rpm.h
│ │ │ │ ├── mavlink_msg_rc_channels.h
│ │ │ │ ├── mavlink_msg_rc_channels_override.h
│ │ │ │ ├── mavlink_msg_rc_channels_raw.h
│ │ │ │ ├── mavlink_msg_rc_channels_scaled.h
│ │ │ │ ├── mavlink_msg_request_data_stream.h
│ │ │ │ ├── mavlink_msg_request_event.h
│ │ │ │ ├── mavlink_msg_resource_request.h
│ │ │ │ ├── mavlink_msg_response_event_error.h
│ │ │ │ ├── mavlink_msg_safety_allowed_area.h
│ │ │ │ ├── mavlink_msg_safety_set_allowed_area.h
│ │ │ │ ├── mavlink_msg_scaled_imu.h
│ │ │ │ ├── mavlink_msg_scaled_imu2.h
│ │ │ │ ├── mavlink_msg_scaled_imu3.h
│ │ │ │ ├── mavlink_msg_scaled_pressure.h
│ │ │ │ ├── mavlink_msg_scaled_pressure2.h
│ │ │ │ ├── mavlink_msg_scaled_pressure3.h
│ │ │ │ ├── mavlink_msg_serial_control.h
│ │ │ │ ├── mavlink_msg_servo_output_raw.h
│ │ │ │ ├── mavlink_msg_set_actuator_control_target.h
│ │ │ │ ├── mavlink_msg_set_attitude_target.h
│ │ │ │ ├── mavlink_msg_set_gps_global_origin.h
│ │ │ │ ├── mavlink_msg_set_home_position.h
│ │ │ │ ├── mavlink_msg_set_mode.h
│ │ │ │ ├── mavlink_msg_set_position_target_global_int.h
│ │ │ │ ├── mavlink_msg_set_position_target_local_ned.h
│ │ │ │ ├── mavlink_msg_setup_signing.h
│ │ │ │ ├── mavlink_msg_sim_state.h
│ │ │ │ ├── mavlink_msg_smart_battery_info.h
│ │ │ │ ├── mavlink_msg_statustext.h
│ │ │ │ ├── mavlink_msg_statustext_long.h
│ │ │ │ ├── mavlink_msg_storage_information.h
│ │ │ │ ├── mavlink_msg_supported_tunes.h
│ │ │ │ ├── mavlink_msg_sys_status.h
│ │ │ │ ├── mavlink_msg_system_time.h
│ │ │ │ ├── mavlink_msg_terrain_check.h
│ │ │ │ ├── mavlink_msg_terrain_data.h
│ │ │ │ ├── mavlink_msg_terrain_report.h
│ │ │ │ ├── mavlink_msg_terrain_request.h
│ │ │ │ ├── mavlink_msg_time_estimate_to_target.h
│ │ │ │ ├── mavlink_msg_timesync.h
│ │ │ │ ├── mavlink_msg_trajectory_representation_bezier.h
│ │ │ │ ├── mavlink_msg_trajectory_representation_waypoints.h
│ │ │ │ ├── mavlink_msg_tunnel.h
│ │ │ │ ├── mavlink_msg_uavcan_node_info.h
│ │ │ │ ├── mavlink_msg_uavcan_node_status.h
│ │ │ │ ├── mavlink_msg_utm_global_position.h
│ │ │ │ ├── mavlink_msg_v2_extension.h
│ │ │ │ ├── mavlink_msg_vfr_hud.h
│ │ │ │ ├── mavlink_msg_vibration.h
│ │ │ │ ├── mavlink_msg_vicon_position_estimate.h
│ │ │ │ ├── mavlink_msg_video_stream_information.h
│ │ │ │ ├── mavlink_msg_video_stream_status.h
│ │ │ │ ├── mavlink_msg_vision_position_estimate.h
│ │ │ │ ├── mavlink_msg_vision_speed_estimate.h
│ │ │ │ ├── mavlink_msg_wheel_distance.h
│ │ │ │ ├── mavlink_msg_wifi_config_ap.h
│ │ │ │ ├── mavlink_msg_winch_status.h
│ │ │ │ ├── mavlink_msg_wind_cov.h
│ │ │ │ ├── testsuite.h
│ │ │ │ └── version.h
│ │ │ │ ├── icarous
│ │ │ │ ├── icarous.h
│ │ │ │ ├── mavlink.h
│ │ │ │ ├── mavlink_msg_icarous_heartbeat.h
│ │ │ │ ├── mavlink_msg_icarous_kinematic_bands.h
│ │ │ │ ├── testsuite.h
│ │ │ │ └── version.h
│ │ │ │ ├── matrixpilot
│ │ │ │ ├── matrixpilot.h
│ │ │ │ ├── mavlink.h
│ │ │ │ ├── mavlink_msg_airspeeds.h
│ │ │ │ ├── mavlink_msg_altitudes.h
│ │ │ │ ├── mavlink_msg_flexifunction_buffer_function.h
│ │ │ │ ├── mavlink_msg_flexifunction_buffer_function_ack.h
│ │ │ │ ├── mavlink_msg_flexifunction_command.h
│ │ │ │ ├── mavlink_msg_flexifunction_command_ack.h
│ │ │ │ ├── mavlink_msg_flexifunction_directory.h
│ │ │ │ ├── mavlink_msg_flexifunction_directory_ack.h
│ │ │ │ ├── mavlink_msg_flexifunction_read_req.h
│ │ │ │ ├── mavlink_msg_flexifunction_set.h
│ │ │ │ ├── mavlink_msg_serial_udb_extra_f13.h
│ │ │ │ ├── mavlink_msg_serial_udb_extra_f14.h
│ │ │ │ ├── mavlink_msg_serial_udb_extra_f15.h
│ │ │ │ ├── mavlink_msg_serial_udb_extra_f16.h
│ │ │ │ ├── mavlink_msg_serial_udb_extra_f17.h
│ │ │ │ ├── mavlink_msg_serial_udb_extra_f18.h
│ │ │ │ ├── mavlink_msg_serial_udb_extra_f19.h
│ │ │ │ ├── mavlink_msg_serial_udb_extra_f20.h
│ │ │ │ ├── mavlink_msg_serial_udb_extra_f21.h
│ │ │ │ ├── mavlink_msg_serial_udb_extra_f22.h
│ │ │ │ ├── mavlink_msg_serial_udb_extra_f2_a.h
│ │ │ │ ├── mavlink_msg_serial_udb_extra_f2_b.h
│ │ │ │ ├── mavlink_msg_serial_udb_extra_f4.h
│ │ │ │ ├── mavlink_msg_serial_udb_extra_f5.h
│ │ │ │ ├── mavlink_msg_serial_udb_extra_f6.h
│ │ │ │ ├── mavlink_msg_serial_udb_extra_f7.h
│ │ │ │ ├── mavlink_msg_serial_udb_extra_f8.h
│ │ │ │ ├── testsuite.h
│ │ │ │ └── version.h
│ │ │ │ ├── mavlink_conversions.h
│ │ │ │ ├── mavlink_get_info.h
│ │ │ │ ├── mavlink_helpers.h
│ │ │ │ ├── mavlink_sha256.h
│ │ │ │ ├── mavlink_types.h
│ │ │ │ ├── minimal
│ │ │ │ ├── mavlink.h
│ │ │ │ ├── mavlink_msg_heartbeat.h
│ │ │ │ ├── mavlink_msg_protocol_version.h
│ │ │ │ ├── minimal.h
│ │ │ │ ├── testsuite.h
│ │ │ │ └── version.h
│ │ │ │ ├── protocol.h
│ │ │ │ ├── slugs
│ │ │ │ ├── mavlink.h
│ │ │ │ ├── mavlink_msg_boot.h
│ │ │ │ ├── mavlink_msg_control_surface.h
│ │ │ │ ├── mavlink_msg_cpu_load.h
│ │ │ │ ├── mavlink_msg_ctrl_srfc_pt.h
│ │ │ │ ├── mavlink_msg_data_log.h
│ │ │ │ ├── mavlink_msg_diagnostic.h
│ │ │ │ ├── mavlink_msg_gps_date_time.h
│ │ │ │ ├── mavlink_msg_isr_location.h
│ │ │ │ ├── mavlink_msg_mid_lvl_cmds.h
│ │ │ │ ├── mavlink_msg_novatel_diag.h
│ │ │ │ ├── mavlink_msg_ptz_status.h
│ │ │ │ ├── mavlink_msg_sensor_bias.h
│ │ │ │ ├── mavlink_msg_sensor_diag.h
│ │ │ │ ├── mavlink_msg_slugs_camera_order.h
│ │ │ │ ├── mavlink_msg_slugs_configuration_camera.h
│ │ │ │ ├── mavlink_msg_slugs_mobile_location.h
│ │ │ │ ├── mavlink_msg_slugs_navigation.h
│ │ │ │ ├── mavlink_msg_status_gps.h
│ │ │ │ ├── mavlink_msg_uav_status.h
│ │ │ │ ├── mavlink_msg_volt_sensor.h
│ │ │ │ ├── slugs.h
│ │ │ │ ├── testsuite.h
│ │ │ │ └── version.h
│ │ │ │ ├── standard
│ │ │ │ ├── mavlink.h
│ │ │ │ ├── standard.h
│ │ │ │ ├── testsuite.h
│ │ │ │ └── version.h
│ │ │ │ ├── test
│ │ │ │ ├── mavlink.h
│ │ │ │ ├── mavlink_msg_test_types.h
│ │ │ │ ├── test.h
│ │ │ │ ├── testsuite.h
│ │ │ │ └── version.h
│ │ │ │ └── uAvionix
│ │ │ │ ├── mavlink.h
│ │ │ │ ├── mavlink_msg_uavionix_adsb_out_cfg.h
│ │ │ │ ├── mavlink_msg_uavionix_adsb_out_dynamic.h
│ │ │ │ ├── mavlink_msg_uavionix_adsb_transceiver_health_report.h
│ │ │ │ ├── testsuite.h
│ │ │ │ ├── uAvionix.h
│ │ │ │ └── version.h
│ │ └── java
│ │ │ └── com
│ │ │ └── geehe
│ │ │ └── mavlink
│ │ │ ├── MavlinkData.java
│ │ │ ├── MavlinkNative.java
│ │ │ └── MavlinkUpdate.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── geehe
│ │ └── mavlink
│ │ └── ExampleUnitTest.java
├── proguard-rules.pro
├── src
│ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── geehe
│ │ │ └── fpvue
│ │ │ └── ExampleInstrumentedTest.java
│ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── assets
│ │ │ └── gs.key
│ │ ├── ic_launcher-playstore.png
│ │ ├── java
│ │ │ ├── com
│ │ │ │ └── geehe
│ │ │ │ │ └── fpvue
│ │ │ │ │ ├── DeviceFilterXmlParser.java
│ │ │ │ │ ├── SettingsChanged.java
│ │ │ │ │ ├── UsbDeviceFilter.java
│ │ │ │ │ ├── VideoActivity.java
│ │ │ │ │ ├── WfbLinkManager.java
│ │ │ │ │ └── osd
│ │ │ │ │ ├── MovableLayout.java
│ │ │ │ │ ├── OSDElement.java
│ │ │ │ │ └── OSDManager.java
│ │ │ └── me
│ │ │ │ └── saket
│ │ │ │ └── cascade
│ │ │ │ └── CascadePopupMenuCheckable.kt
│ │ └── res
│ │ │ ├── drawable
│ │ │ ├── air_speed.png
│ │ │ ├── alt.png
│ │ │ ├── amp.png
│ │ │ ├── armed.png
│ │ │ ├── baseline_battery_0_bar_24.xml
│ │ │ ├── baseline_battery_1_bar_24.xml
│ │ │ ├── baseline_battery_2_bar_24.xml
│ │ │ ├── baseline_battery_3_bar_24.xml
│ │ │ ├── baseline_battery_4_bar_24.xml
│ │ │ ├── baseline_battery_5_bar_24.xml
│ │ │ ├── baseline_battery_6_bar_24.xml
│ │ │ ├── baseline_battery_charging_full_24.xml
│ │ │ ├── baseline_battery_full_24.xml
│ │ │ ├── baseline_fiber_manual_record_24.xml
│ │ │ ├── baseline_import_export_24.xml
│ │ │ ├── baseline_personal_video_24.xml
│ │ │ ├── baseline_settings_24.xml
│ │ │ ├── battery.png
│ │ │ ├── celsius.png
│ │ │ ├── circle.png
│ │ │ ├── compass.png
│ │ │ ├── cross_hair.png
│ │ │ ├── dis.png
│ │ │ ├── disarmed.png
│ │ │ ├── fahrenheit.png
│ │ │ ├── gnd_speed.png
│ │ │ ├── home.png
│ │ │ ├── home_dist.png
│ │ │ ├── ic_launcher_background.xml
│ │ │ ├── ic_launcher_foreground.xml
│ │ │ ├── kmh.png
│ │ │ ├── lat.png
│ │ │ ├── link.png
│ │ │ ├── lon.png
│ │ │ ├── ms.png
│ │ │ ├── navigation.png
│ │ │ ├── navigation_rev.png
│ │ │ ├── pitch.png
│ │ │ ├── roll.png
│ │ │ ├── rssi.png
│ │ │ ├── sat1.png
│ │ │ ├── sat2.png
│ │ │ ├── timer.png
│ │ │ └── wnd_speed.png
│ │ │ ├── layout
│ │ │ └── activity_video.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ │ ├── mipmap-anydpi
│ │ │ └── icon.png
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.webp
│ │ │ ├── ic_launcher_foreground.webp
│ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.webp
│ │ │ ├── ic_launcher_foreground.webp
│ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.webp
│ │ │ ├── ic_launcher_foreground.webp
│ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.webp
│ │ │ ├── ic_launcher_foreground.webp
│ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.webp
│ │ │ ├── ic_launcher_foreground.webp
│ │ │ └── ic_launcher_round.webp
│ │ │ ├── values-night
│ │ │ └── themes.xml
│ │ │ ├── values
│ │ │ ├── colors.xml
│ │ │ ├── ic_launcher_background.xml
│ │ │ ├── strings.xml
│ │ │ ├── styles.xml
│ │ │ └── themes.xml
│ │ │ └── xml
│ │ │ ├── backup_rules.xml
│ │ │ ├── data_extraction_rules.xml
│ │ │ └── usb_device_filter.xml
│ └── test
│ │ └── java
│ │ └── com
│ │ └── geehe
│ │ └── fpvue
│ │ └── ExampleUnitTest.java
├── videonative
│ ├── .gitignore
│ ├── build.gradle.kts
│ ├── consumer-rules.pro
│ ├── proguard-rules.pro
│ └── src
│ │ └── main
│ │ ├── cpp
│ │ ├── AndroidThreadPrioValues.hpp
│ │ ├── CMakeLists.txt
│ │ ├── NALU
│ │ │ ├── H26X.hpp
│ │ │ ├── KeyFrameFinder.hpp
│ │ │ ├── NALU.hpp
│ │ │ └── NALUnitType.hpp
│ │ ├── UdpReceiver.cpp
│ │ ├── UdpReceiver.h
│ │ ├── VideoDecoder.cpp
│ │ ├── VideoDecoder.h
│ │ ├── VideoPlayer.cpp
│ │ ├── VideoPlayer.h
│ │ ├── helper
│ │ │ ├── AndroidLogger.hpp
│ │ │ ├── AndroidMediaFormatHelper.h
│ │ │ ├── NDKArrayHelper.hpp
│ │ │ ├── NDKHelper.hpp
│ │ │ ├── NDKThreadHelper.hpp
│ │ │ ├── StringHelper.hpp
│ │ │ └── TimeHelper.hpp
│ │ ├── minimp4.h
│ │ ├── parser
│ │ │ ├── H26XParser.cpp
│ │ │ ├── H26XParser.h
│ │ │ ├── ParseRTP.cpp
│ │ │ ├── ParseRTP.h
│ │ │ └── RTP.hpp
│ │ └── time_util.h
│ │ └── java
│ │ └── com
│ │ └── geehe
│ │ └── videonative
│ │ ├── AspectFrameLayout.java
│ │ ├── DecodingInfo.java
│ │ ├── ISurfaceTextureAvailable.java
│ │ ├── IVideoParamsChanged.java
│ │ └── VideoPlayer.java
└── wfbngrtl8812
│ ├── .gitignore
│ ├── build.gradle.kts
│ ├── consumer-rules.pro
│ ├── proguard-rules.pro
│ └── src
│ └── main
│ ├── cpp
│ ├── CMakeLists.txt
│ ├── RxFrame.cpp
│ ├── RxFrame.h
│ ├── WfbngLink.cpp
│ ├── WfbngLink.hpp
│ ├── include
│ │ ├── libusb.h
│ │ ├── pcap.h
│ │ ├── pcap
│ │ │ ├── bluetooth.h
│ │ │ ├── bpf.h
│ │ │ ├── can_socketcan.h
│ │ │ ├── compiler-tests.h
│ │ │ ├── dlt.h
│ │ │ ├── funcattrs.h
│ │ │ ├── ipnet.h
│ │ │ ├── namedb.h
│ │ │ ├── nflog.h
│ │ │ ├── pcap-inttypes.h
│ │ │ ├── sll.h
│ │ │ ├── socket.h
│ │ │ ├── usb.h
│ │ │ └── vlan.h
│ │ ├── sodium.h
│ │ └── sodium
│ │ │ ├── core.h
│ │ │ ├── crypto_aead_aegis128l.h
│ │ │ ├── crypto_aead_aegis256.h
│ │ │ ├── crypto_aead_aes256gcm.h
│ │ │ ├── crypto_aead_chacha20poly1305.h
│ │ │ ├── crypto_aead_xchacha20poly1305.h
│ │ │ ├── crypto_auth.h
│ │ │ ├── crypto_auth_hmacsha256.h
│ │ │ ├── crypto_auth_hmacsha512.h
│ │ │ ├── crypto_auth_hmacsha512256.h
│ │ │ ├── crypto_box.h
│ │ │ ├── crypto_box_curve25519xchacha20poly1305.h
│ │ │ ├── crypto_box_curve25519xsalsa20poly1305.h
│ │ │ ├── crypto_core_ed25519.h
│ │ │ ├── crypto_core_hchacha20.h
│ │ │ ├── crypto_core_hsalsa20.h
│ │ │ ├── crypto_core_ristretto255.h
│ │ │ ├── crypto_core_salsa20.h
│ │ │ ├── crypto_core_salsa2012.h
│ │ │ ├── crypto_core_salsa208.h
│ │ │ ├── crypto_generichash.h
│ │ │ ├── crypto_generichash_blake2b.h
│ │ │ ├── crypto_hash.h
│ │ │ ├── crypto_hash_sha256.h
│ │ │ ├── crypto_hash_sha512.h
│ │ │ ├── crypto_kdf.h
│ │ │ ├── crypto_kdf_blake2b.h
│ │ │ ├── crypto_kdf_hkdf_sha256.h
│ │ │ ├── crypto_kdf_hkdf_sha512.h
│ │ │ ├── crypto_kx.h
│ │ │ ├── crypto_onetimeauth.h
│ │ │ ├── crypto_onetimeauth_poly1305.h
│ │ │ ├── crypto_pwhash.h
│ │ │ ├── crypto_pwhash_argon2i.h
│ │ │ ├── crypto_pwhash_argon2id.h
│ │ │ ├── crypto_pwhash_scryptsalsa208sha256.h
│ │ │ ├── crypto_scalarmult.h
│ │ │ ├── crypto_scalarmult_curve25519.h
│ │ │ ├── crypto_scalarmult_ed25519.h
│ │ │ ├── crypto_scalarmult_ristretto255.h
│ │ │ ├── crypto_secretbox.h
│ │ │ ├── crypto_secretbox_xchacha20poly1305.h
│ │ │ ├── crypto_secretbox_xsalsa20poly1305.h
│ │ │ ├── crypto_secretstream_xchacha20poly1305.h
│ │ │ ├── crypto_shorthash.h
│ │ │ ├── crypto_shorthash_siphash24.h
│ │ │ ├── crypto_sign.h
│ │ │ ├── crypto_sign_ed25519.h
│ │ │ ├── crypto_sign_edwards25519sha512batch.h
│ │ │ ├── crypto_stream.h
│ │ │ ├── crypto_stream_chacha20.h
│ │ │ ├── crypto_stream_salsa20.h
│ │ │ ├── crypto_stream_salsa2012.h
│ │ │ ├── crypto_stream_salsa208.h
│ │ │ ├── crypto_stream_xchacha20.h
│ │ │ ├── crypto_stream_xsalsa20.h
│ │ │ ├── crypto_verify_16.h
│ │ │ ├── crypto_verify_32.h
│ │ │ ├── crypto_verify_64.h
│ │ │ ├── export.h
│ │ │ ├── randombytes.h
│ │ │ ├── randombytes_internal_random.h
│ │ │ ├── randombytes_sysrandom.h
│ │ │ ├── runtime.h
│ │ │ ├── utils.h
│ │ │ └── version.h
│ └── libs
│ │ ├── arm64-v8a
│ │ ├── libpcap.a
│ │ ├── libsodium.so
│ │ ├── libunrooted_android.so
│ │ └── libusb1.0.so
│ │ └── armeabi-v7a
│ │ ├── libpcap.a
│ │ ├── libpcap.so.1
│ │ ├── libsodium.so
│ │ ├── libunrooted_android.so
│ │ ├── libusb1.0.so
│ │ ├── libusb1.0.so.1
│ │ └── libusb1.0.so.2
│ └── java
│ └── com
│ └── geehe
│ └── wfbngrtl8812
│ ├── WfbNGStats.java
│ ├── WfbNGStatsChanged.java
│ └── WfbNgLink.java
├── build.gradle.kts
├── gradle.properties
├── gradle
├── libs.versions.toml
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle.kts
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .idea/deploymentTargetDropDown.xml
11 | .DS_Store
12 | /build
13 | /captures
14 | .externalNativeBuild
15 | .cxx
16 | local.properties
17 | /.idea
18 | .idea
19 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "app/wfbngrtl8812/src/main/cpp/devourer"]
2 | path = app/wfbngrtl8812/src/main/cpp/devourer
3 | url = https://github.com/gehee/devourer.git
4 | branch = android-compat
5 |
6 | [submodule "app/wfbngrtl8812/src/main/cpp/wfb-ng"]
7 | path = app/wfbngrtl8812/src/main/cpp/wfb-ng
8 | url = https://github.com/svpcom/wfb-ng.git
9 | branch = master
10 |
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # FPVue_android
2 |
3 | > [!IMPORTANT]
4 | > August 2024: Unfortunately, this repository is now in an unmaintained state.
5 | > I don't have the time to maitain it like I would like to and there was not enough interest from external developers to contribute to it.
6 | > Feel free to fork it and take over but for now it will stay as is.
7 |
8 | FPVue Android is an app packaging multiple pieces together to decode an H264/H265 video feed broadcast by wfb-ng over the air.
9 |
10 | - [devourer](https://github.com/openipc/devourer): userspace rtl8812au driver initially created by [buldo](https://github.com/buldo) and converted to C by [josephnef](https://github.com/josephnef) .
11 | - [LiveVideo10ms](https://github.com/Consti10/LiveVideo10ms): excellent video decoder from [Consti10](https://github.com/Consti10) converted into a module.
12 | - [wfb-ng](https://github.com/svpcom/wfb-ng): library allowing the broadcast of the video feed over the air.
13 |
14 | The wfb-ng [gs.key](https://github.com/gehee/FPVue_android/raw/main/app/src/main/assets/gs.key) is embedded in the app.
15 | The settings menu allows selecting a different key from your phone.
16 |
17 | Supported rtl8812au wifi adapter are listed [here](https://github.com/gehee/FPVue_android/blob/main/app/src/main/res/xml/usb_device_filter.xml).
18 | Feel free to send pull requests to add new supported wifi adapters hardware IDs.
19 |
20 | Now support saving a dvr of the video feed to `Files/Internal Storage/Movies/`
21 |
22 |
23 |
24 | ## Compatibility
25 |
26 | - arm64-v8a, armeabi-v7a android devices (including Meta Quest 2/3, non vr mode)
27 |
28 | ## Build
29 |
30 | ```
31 | git clone https://github.com/gehee/FPVue_android.git
32 | cd FPVue_android
33 | git submodule init
34 | git submodule update
35 | ```
36 |
37 | The project can then be opened in android studio and built from there.
38 |
39 |
40 | ## Installation instructions
41 |
42 | 1. Download apk from https://github.com/gehee/FPVue_android/releases.
43 | 2. Run `adb install FPVue_android_0.14.1.apk` from the command line.
44 | 3. Download [gs.key](https://github.com/gehee/FPVue_android/raw/main/app/src/main/assets/gs.key), rename it to drone.key and copy it on the air side, or select a local gs.key file from your phone in the app settings.
45 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.androidApplication)
3 | id("org.jetbrains.kotlin.android")
4 | }
5 |
6 | android {
7 | namespace = "com.geehe.fpvue"
8 | compileSdk = 34
9 |
10 | defaultConfig {
11 | applicationId = "com.geehe.fpvue"
12 | minSdk = 26
13 | targetSdk = 34
14 | versionCode = 1
15 | versionName = "1.0"
16 |
17 | testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
18 | }
19 |
20 | buildTypes {
21 | release {
22 | isMinifyEnabled = false
23 | proguardFiles(
24 | getDefaultProguardFile("proguard-android-optimize.txt"),
25 | "proguard-rules.pro"
26 | )
27 | ndk {
28 | abiFilters.add("arm64-v8a")
29 | abiFilters.add("armeabi-v7a")
30 | }
31 | }
32 | debug {
33 | ndk {
34 | abiFilters.add("arm64-v8a")
35 | abiFilters.add("armeabi-v7a")
36 | }
37 | }
38 | }
39 | compileOptions {
40 | sourceCompatibility = JavaVersion.VERSION_1_8
41 | targetCompatibility = JavaVersion.VERSION_1_8
42 | }
43 | buildFeatures {
44 | viewBinding = true
45 | }
46 | kotlinOptions {
47 | jvmTarget = "1.8"
48 | }
49 | }
50 |
51 |
52 | dependencies {
53 |
54 | implementation(libs.appcompat)
55 | implementation(libs.material)
56 | implementation(project(":app:wfbngrtl8812"))
57 | implementation(project(":app:mavlink"))
58 | implementation("androidx.core:core-ktx:1.13.0")
59 | implementation("com.github.Philjay:mpandroidchart:3.1.0")
60 |
61 | testImplementation(libs.junit)
62 | androidTestImplementation(libs.ext.junit)
63 | androidTestImplementation(libs.espresso.core)
64 |
65 | implementation(libs.me.saket.cascade.cascade)
66 | implementation(libs.cascade.compose)
67 |
68 | implementation(project(":app:videonative"))
69 | }
--------------------------------------------------------------------------------
/app/mavlink/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app/mavlink/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.androidLibrary)
3 | }
4 |
5 | android {
6 | namespace = "com.geehe.mavlink"
7 | compileSdk = 34
8 |
9 | defaultConfig {
10 | minSdk = 26
11 |
12 | testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
13 | consumerProguardFiles("consumer-rules.pro")
14 | externalNativeBuild {
15 | cmake {
16 | cppFlags("-std=c++17")
17 | }
18 | }
19 | }
20 |
21 | buildTypes {
22 | release {
23 | isMinifyEnabled = false
24 | proguardFiles(
25 | getDefaultProguardFile("proguard-android-optimize.txt"),
26 | "proguard-rules.pro"
27 | )
28 | }
29 | }
30 | externalNativeBuild {
31 | cmake {
32 | path("src/main/cpp/CMakeLists.txt")
33 | version = "3.22.1"
34 | }
35 | }
36 | compileOptions {
37 | sourceCompatibility = JavaVersion.VERSION_1_8
38 | targetCompatibility = JavaVersion.VERSION_1_8
39 | }
40 | }
41 |
42 | dependencies {
43 |
44 | implementation(libs.appcompat)
45 | implementation(libs.material)
46 | testImplementation(libs.junit)
47 | androidTestImplementation(libs.ext.junit)
48 | androidTestImplementation(libs.espresso.core)
49 | }
--------------------------------------------------------------------------------
/app/mavlink/consumer-rules.pro:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/mavlink/consumer-rules.pro
--------------------------------------------------------------------------------
/app/mavlink/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/app/mavlink/src/androidTest/java/com/geehe/mavlink/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.geehe.mavlink;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.platform.app.InstrumentationRegistry;
6 | import androidx.test.ext.junit.runners.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24 | assertEquals("com.geehe.mavlink.test", appContext.getPackageName());
25 | }
26 | }
--------------------------------------------------------------------------------
/app/mavlink/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app/mavlink/src/main/cpp/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # For more information about using CMake with Android Studio, read the
2 | # documentation: https://d.android.com/studio/projects/add-native-code.html.
3 | # For more examples on how to use CMake, see https://github.com/android/ndk-samples.
4 |
5 | # Sets the minimum CMake version required for this project.
6 | cmake_minimum_required(VERSION 3.22.1)
7 |
8 | # Declares the project name. The project name can be accessed via ${ PROJECT_NAME},
9 | # Since this is the top level CMakeLists.txt, the project name is also accessible
10 | # with ${CMAKE_PROJECT_NAME} (both CMake variables are in-sync within the top level
11 | # build script scope).
12 | project("mavlink")
13 |
14 | # Creates and names a library, sets it as either STATIC
15 | # or SHARED, and provides the relative paths to its source code.
16 | # You can define multiple libraries, and CMake builds them for you.
17 | # Gradle automatically packages shared libraries with your APK.
18 | #
19 | # In this top level CMakeLists.txt, ${CMAKE_PROJECT_NAME} is used to define
20 | # the target library name; in the sub-module's CMakeLists.txt, ${PROJECT_NAME}
21 | # is preferred for the same purpose.
22 | #
23 | # In order to load a library into your app from Java/Kotlin, you must call
24 | # System.loadLibrary() and pass the name of the library defined here;
25 | # for GameActivity/NativeActivity derived applications, the same library name must be
26 | # used in the AndroidManifest.xml file.
27 | add_library(${CMAKE_PROJECT_NAME} SHARED
28 | # List C/C++ source files with relative paths to this CMakeLists.txt.
29 | mavlink.cpp)
30 |
31 | # Specifies libraries CMake should link to your target library. You
32 | # can link libraries from various origins, such as libraries defined in this
33 | # build script, prebuilt third-party libraries, or Android system libraries.
34 | target_link_libraries(${CMAKE_PROJECT_NAME}
35 | # List libraries link to the target library
36 | android
37 | log)
--------------------------------------------------------------------------------
/app/mavlink/src/main/cpp/mavlink/ASLUAV/mavlink.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | * @brief MAVLink comm protocol built from ASLUAV.xml
3 | * @see http://mavlink.org
4 | */
5 | #pragma once
6 | #ifndef MAVLINK_H
7 | #define MAVLINK_H
8 |
9 | #define MAVLINK_PRIMARY_XML_IDX 0
10 |
11 | #ifndef MAVLINK_STX
12 | #define MAVLINK_STX 253
13 | #endif
14 |
15 | #ifndef MAVLINK_ENDIAN
16 | #define MAVLINK_ENDIAN MAVLINK_LITTLE_ENDIAN
17 | #endif
18 |
19 | #ifndef MAVLINK_ALIGNED_FIELDS
20 | #define MAVLINK_ALIGNED_FIELDS 1
21 | #endif
22 |
23 | #ifndef MAVLINK_CRC_EXTRA
24 | #define MAVLINK_CRC_EXTRA 1
25 | #endif
26 |
27 | #ifndef MAVLINK_COMMAND_24BIT
28 | #define MAVLINK_COMMAND_24BIT 1
29 | #endif
30 |
31 | #include "version.h"
32 | #include "ASLUAV.h"
33 |
34 | #endif // MAVLINK_H
35 |
--------------------------------------------------------------------------------
/app/mavlink/src/main/cpp/mavlink/ASLUAV/version.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | * @brief MAVLink comm protocol built from ASLUAV.xml
3 | * @see http://mavlink.org
4 | */
5 | #pragma once
6 |
7 | #ifndef MAVLINK_VERSION_H
8 | #define MAVLINK_VERSION_H
9 |
10 | #define MAVLINK_BUILD_DATE "Tue Jan 22 2019"
11 | #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
12 | #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
13 |
14 | #endif // MAVLINK_VERSION_H
15 |
--------------------------------------------------------------------------------
/app/mavlink/src/main/cpp/mavlink/ardupilotmega/mavlink.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | * @brief MAVLink comm protocol built from ardupilotmega.xml
3 | * @see http://mavlink.org
4 | */
5 | #pragma once
6 | #ifndef MAVLINK_H
7 | #define MAVLINK_H
8 |
9 | #define MAVLINK_PRIMARY_XML_IDX 0
10 |
11 | #ifndef MAVLINK_STX
12 | #define MAVLINK_STX 253
13 | #endif
14 |
15 | #ifndef MAVLINK_ENDIAN
16 | #define MAVLINK_ENDIAN MAVLINK_LITTLE_ENDIAN
17 | #endif
18 |
19 | #ifndef MAVLINK_ALIGNED_FIELDS
20 | #define MAVLINK_ALIGNED_FIELDS 1
21 | #endif
22 |
23 | #ifndef MAVLINK_CRC_EXTRA
24 | #define MAVLINK_CRC_EXTRA 1
25 | #endif
26 |
27 | #ifndef MAVLINK_COMMAND_24BIT
28 | #define MAVLINK_COMMAND_24BIT 1
29 | #endif
30 |
31 | #include "version.h"
32 | #include "ardupilotmega.h"
33 |
34 | #endif // MAVLINK_H
35 |
--------------------------------------------------------------------------------
/app/mavlink/src/main/cpp/mavlink/ardupilotmega/version.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | * @brief MAVLink comm protocol built from ardupilotmega.xml
3 | * @see http://mavlink.org
4 | */
5 | #pragma once
6 |
7 | #ifndef MAVLINK_VERSION_H
8 | #define MAVLINK_VERSION_H
9 |
10 | #define MAVLINK_BUILD_DATE "Tue Jan 22 2019"
11 | #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
12 | #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
13 |
14 | #endif // MAVLINK_VERSION_H
15 |
--------------------------------------------------------------------------------
/app/mavlink/src/main/cpp/mavlink/autoquad/mavlink.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | * @brief MAVLink comm protocol built from autoquad.xml
3 | * @see http://mavlink.org
4 | */
5 | #pragma once
6 | #ifndef MAVLINK_H
7 | #define MAVLINK_H
8 |
9 | #define MAVLINK_PRIMARY_XML_IDX 0
10 |
11 | #ifndef MAVLINK_STX
12 | #define MAVLINK_STX 253
13 | #endif
14 |
15 | #ifndef MAVLINK_ENDIAN
16 | #define MAVLINK_ENDIAN MAVLINK_LITTLE_ENDIAN
17 | #endif
18 |
19 | #ifndef MAVLINK_ALIGNED_FIELDS
20 | #define MAVLINK_ALIGNED_FIELDS 1
21 | #endif
22 |
23 | #ifndef MAVLINK_CRC_EXTRA
24 | #define MAVLINK_CRC_EXTRA 1
25 | #endif
26 |
27 | #ifndef MAVLINK_COMMAND_24BIT
28 | #define MAVLINK_COMMAND_24BIT 1
29 | #endif
30 |
31 | #include "version.h"
32 | #include "autoquad.h"
33 |
34 | #endif // MAVLINK_H
35 |
--------------------------------------------------------------------------------
/app/mavlink/src/main/cpp/mavlink/autoquad/version.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | * @brief MAVLink comm protocol built from autoquad.xml
3 | * @see http://mavlink.org
4 | */
5 | #pragma once
6 |
7 | #ifndef MAVLINK_VERSION_H
8 | #define MAVLINK_VERSION_H
9 |
10 | #define MAVLINK_BUILD_DATE "Tue Jan 22 2019"
11 | #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
12 | #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
13 |
14 | #endif // MAVLINK_VERSION_H
15 |
--------------------------------------------------------------------------------
/app/mavlink/src/main/cpp/mavlink/checksum.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #if defined(MAVLINK_USE_CXX_NAMESPACE)
4 | namespace mavlink {
5 | #elif defined(__cplusplus)
6 | extern "C" {
7 | #endif
8 |
9 | // Visual Studio versions before 2010 don't have stdint.h, so we just error out.
10 | #if (defined _MSC_VER) && (_MSC_VER < 1600)
11 | #error "The C-MAVLink implementation requires Visual Studio 2010 or greater"
12 | #endif
13 |
14 | #include
15 |
16 | /**
17 | *
18 | * CALCULATE THE CHECKSUM
19 | *
20 | */
21 |
22 | #define X25_INIT_CRC 0xffff
23 | #define X25_VALIDATE_CRC 0xf0b8
24 |
25 | #ifndef HAVE_CRC_ACCUMULATE
26 | /**
27 | * @brief Accumulate the X.25 CRC by adding one char at a time.
28 | *
29 | * The checksum function adds the hash of one char at a time to the
30 | * 16 bit checksum (uint16_t).
31 | *
32 | * @param data new char to hash
33 | * @param crcAccum the already accumulated checksum
34 | **/
35 | static inline void crc_accumulate(uint8_t data, uint16_t *crcAccum)
36 | {
37 | /*Accumulate one byte of data into the CRC*/
38 | uint8_t tmp;
39 |
40 | tmp = data ^ (uint8_t)(*crcAccum &0xff);
41 | tmp ^= (tmp<<4);
42 | *crcAccum = (*crcAccum>>8) ^ (tmp<<8) ^ (tmp <<3) ^ (tmp>>4);
43 | }
44 | #endif
45 |
46 |
47 | /**
48 | * @brief Initiliaze the buffer for the X.25 CRC
49 | *
50 | * @param crcAccum the 16 bit X.25 CRC
51 | */
52 | static inline void crc_init(uint16_t* crcAccum)
53 | {
54 | *crcAccum = X25_INIT_CRC;
55 | }
56 |
57 |
58 | /**
59 | * @brief Calculates the X.25 checksum on a byte buffer
60 | *
61 | * @param pBuffer buffer containing the byte array to hash
62 | * @param length length of the byte array
63 | * @return the checksum over the buffer bytes
64 | **/
65 | static inline uint16_t crc_calculate(const uint8_t* pBuffer, uint16_t length)
66 | {
67 | uint16_t crcTmp;
68 | crc_init(&crcTmp);
69 | while (length--) {
70 | crc_accumulate(*pBuffer++, &crcTmp);
71 | }
72 | return crcTmp;
73 | }
74 |
75 |
76 | /**
77 | * @brief Accumulate the X.25 CRC by adding an array of bytes
78 | *
79 | * The checksum function adds the hash of one char at a time to the
80 | * 16 bit checksum (uint16_t).
81 | *
82 | * @param data new bytes to hash
83 | * @param crcAccum the already accumulated checksum
84 | **/
85 | static inline void crc_accumulate_buffer(uint16_t *crcAccum, const char *pBuffer, uint16_t length)
86 | {
87 | const uint8_t *p = (const uint8_t *)pBuffer;
88 | while (length--) {
89 | crc_accumulate(*p++, crcAccum);
90 | }
91 | }
92 |
93 | #if defined(MAVLINK_USE_CXX_NAMESPACE) || defined(__cplusplus)
94 | }
95 | #endif
96 |
--------------------------------------------------------------------------------
/app/mavlink/src/main/cpp/mavlink/common/mavlink.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | * @brief MAVLink comm protocol built from common.xml
3 | * @see http://mavlink.org
4 | */
5 | #pragma once
6 | #ifndef MAVLINK_H
7 | #define MAVLINK_H
8 |
9 | #define MAVLINK_PRIMARY_XML_IDX 1
10 |
11 | #ifndef MAVLINK_STX
12 | #define MAVLINK_STX 253
13 | #endif
14 |
15 | #ifndef MAVLINK_ENDIAN
16 | #define MAVLINK_ENDIAN MAVLINK_LITTLE_ENDIAN
17 | #endif
18 |
19 | #ifndef MAVLINK_ALIGNED_FIELDS
20 | #define MAVLINK_ALIGNED_FIELDS 1
21 | #endif
22 |
23 | #ifndef MAVLINK_CRC_EXTRA
24 | #define MAVLINK_CRC_EXTRA 1
25 | #endif
26 |
27 | #ifndef MAVLINK_COMMAND_24BIT
28 | #define MAVLINK_COMMAND_24BIT 1
29 | #endif
30 |
31 | #include "version.h"
32 | #include "common.h"
33 |
34 | #endif // MAVLINK_H
35 |
--------------------------------------------------------------------------------
/app/mavlink/src/main/cpp/mavlink/common/version.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | * @brief MAVLink comm protocol built from common.xml
3 | * @see http://mavlink.org
4 | */
5 | #pragma once
6 |
7 | #ifndef MAVLINK_VERSION_H
8 | #define MAVLINK_VERSION_H
9 |
10 | #define MAVLINK_BUILD_DATE "Tue Jan 22 2019"
11 | #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
12 | #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
13 |
14 | #endif // MAVLINK_VERSION_H
15 |
--------------------------------------------------------------------------------
/app/mavlink/src/main/cpp/mavlink/icarous/icarous.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | * @brief MAVLink comm protocol generated from icarous.xml
3 | * @see http://mavlink.org
4 | */
5 | #pragma once
6 | #ifndef MAVLINK_ICAROUS_H
7 | #define MAVLINK_ICAROUS_H
8 |
9 | #ifndef MAVLINK_H
10 | #error Wrong include order: MAVLINK_ICAROUS.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
11 | #endif
12 |
13 | #undef MAVLINK_THIS_XML_IDX
14 | #define MAVLINK_THIS_XML_IDX 3
15 |
16 | #ifdef __cplusplus
17 | extern "C" {
18 | #endif
19 |
20 | // MESSAGE LENGTHS AND CRCS
21 |
22 | #ifndef MAVLINK_MESSAGE_LENGTHS
23 | #define MAVLINK_MESSAGE_LENGTHS {}
24 | #endif
25 |
26 | #ifndef MAVLINK_MESSAGE_CRCS
27 | #define MAVLINK_MESSAGE_CRCS {{42000, 227, 1, 0, 0, 0}, {42001, 239, 46, 0, 0, 0}}
28 | #endif
29 |
30 | #include "../protocol.h"
31 |
32 | #define MAVLINK_ENABLED_ICAROUS
33 |
34 | // ENUM DEFINITIONS
35 |
36 |
37 | /** @brief */
38 | #ifndef HAVE_ENUM_ICAROUS_TRACK_BAND_TYPES
39 | #define HAVE_ENUM_ICAROUS_TRACK_BAND_TYPES
40 | typedef enum ICAROUS_TRACK_BAND_TYPES
41 | {
42 | ICAROUS_TRACK_BAND_TYPE_NONE=0, /* | */
43 | ICAROUS_TRACK_BAND_TYPE_NEAR=1, /* | */
44 | ICAROUS_TRACK_BAND_TYPE_RECOVERY=2, /* | */
45 | ICAROUS_TRACK_BAND_TYPES_ENUM_END=3, /* | */
46 | } ICAROUS_TRACK_BAND_TYPES;
47 | #endif
48 |
49 | /** @brief */
50 | #ifndef HAVE_ENUM_ICAROUS_FMS_STATE
51 | #define HAVE_ENUM_ICAROUS_FMS_STATE
52 | typedef enum ICAROUS_FMS_STATE
53 | {
54 | ICAROUS_FMS_STATE_IDLE=0, /* | */
55 | ICAROUS_FMS_STATE_TAKEOFF=1, /* | */
56 | ICAROUS_FMS_STATE_CLIMB=2, /* | */
57 | ICAROUS_FMS_STATE_CRUISE=3, /* | */
58 | ICAROUS_FMS_STATE_APPROACH=4, /* | */
59 | ICAROUS_FMS_STATE_LAND=5, /* | */
60 | ICAROUS_FMS_STATE_ENUM_END=6, /* | */
61 | } ICAROUS_FMS_STATE;
62 | #endif
63 |
64 | // MAVLINK VERSION
65 |
66 | #ifndef MAVLINK_VERSION
67 | #define MAVLINK_VERSION 2
68 | #endif
69 |
70 | #if (MAVLINK_VERSION == 0)
71 | #undef MAVLINK_VERSION
72 | #define MAVLINK_VERSION 2
73 | #endif
74 |
75 | // MESSAGE DEFINITIONS
76 | #include "./mavlink_msg_icarous_heartbeat.h"
77 | #include "./mavlink_msg_icarous_kinematic_bands.h"
78 |
79 | // base include
80 |
81 |
82 | #undef MAVLINK_THIS_XML_IDX
83 | #define MAVLINK_THIS_XML_IDX 3
84 |
85 | #if MAVLINK_THIS_XML_IDX == MAVLINK_PRIMARY_XML_IDX
86 | # define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_ICAROUS_HEARTBEAT, MAVLINK_MESSAGE_INFO_ICAROUS_KINEMATIC_BANDS}
87 | # define MAVLINK_MESSAGE_NAMES {{ "ICAROUS_HEARTBEAT", 42000 }, { "ICAROUS_KINEMATIC_BANDS", 42001 }}
88 | # if MAVLINK_COMMAND_24BIT
89 | # include "../mavlink_get_info.h"
90 | # endif
91 | #endif
92 |
93 | #ifdef __cplusplus
94 | }
95 | #endif // __cplusplus
96 | #endif // MAVLINK_ICAROUS_H
97 |
--------------------------------------------------------------------------------
/app/mavlink/src/main/cpp/mavlink/icarous/mavlink.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | * @brief MAVLink comm protocol built from icarous.xml
3 | * @see http://mavlink.org
4 | */
5 | #pragma once
6 | #ifndef MAVLINK_H
7 | #define MAVLINK_H
8 |
9 | #define MAVLINK_PRIMARY_XML_IDX 3
10 |
11 | #ifndef MAVLINK_STX
12 | #define MAVLINK_STX 253
13 | #endif
14 |
15 | #ifndef MAVLINK_ENDIAN
16 | #define MAVLINK_ENDIAN MAVLINK_LITTLE_ENDIAN
17 | #endif
18 |
19 | #ifndef MAVLINK_ALIGNED_FIELDS
20 | #define MAVLINK_ALIGNED_FIELDS 1
21 | #endif
22 |
23 | #ifndef MAVLINK_CRC_EXTRA
24 | #define MAVLINK_CRC_EXTRA 1
25 | #endif
26 |
27 | #ifndef MAVLINK_COMMAND_24BIT
28 | #define MAVLINK_COMMAND_24BIT 1
29 | #endif
30 |
31 | #include "version.h"
32 | #include "icarous.h"
33 |
34 | #endif // MAVLINK_H
35 |
--------------------------------------------------------------------------------
/app/mavlink/src/main/cpp/mavlink/icarous/version.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | * @brief MAVLink comm protocol built from icarous.xml
3 | * @see http://mavlink.org
4 | */
5 | #pragma once
6 |
7 | #ifndef MAVLINK_VERSION_H
8 | #define MAVLINK_VERSION_H
9 |
10 | #define MAVLINK_BUILD_DATE "Tue Jan 22 2019"
11 | #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
12 | #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
13 |
14 | #endif // MAVLINK_VERSION_H
15 |
--------------------------------------------------------------------------------
/app/mavlink/src/main/cpp/mavlink/matrixpilot/mavlink.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | * @brief MAVLink comm protocol built from matrixpilot.xml
3 | * @see http://mavlink.org
4 | */
5 | #pragma once
6 | #ifndef MAVLINK_H
7 | #define MAVLINK_H
8 |
9 | #define MAVLINK_PRIMARY_XML_IDX 0
10 |
11 | #ifndef MAVLINK_STX
12 | #define MAVLINK_STX 253
13 | #endif
14 |
15 | #ifndef MAVLINK_ENDIAN
16 | #define MAVLINK_ENDIAN MAVLINK_LITTLE_ENDIAN
17 | #endif
18 |
19 | #ifndef MAVLINK_ALIGNED_FIELDS
20 | #define MAVLINK_ALIGNED_FIELDS 1
21 | #endif
22 |
23 | #ifndef MAVLINK_CRC_EXTRA
24 | #define MAVLINK_CRC_EXTRA 1
25 | #endif
26 |
27 | #ifndef MAVLINK_COMMAND_24BIT
28 | #define MAVLINK_COMMAND_24BIT 1
29 | #endif
30 |
31 | #include "version.h"
32 | #include "matrixpilot.h"
33 |
34 | #endif // MAVLINK_H
35 |
--------------------------------------------------------------------------------
/app/mavlink/src/main/cpp/mavlink/matrixpilot/version.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | * @brief MAVLink comm protocol built from matrixpilot.xml
3 | * @see http://mavlink.org
4 | */
5 | #pragma once
6 |
7 | #ifndef MAVLINK_VERSION_H
8 | #define MAVLINK_VERSION_H
9 |
10 | #define MAVLINK_BUILD_DATE "Tue Jan 22 2019"
11 | #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
12 | #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
13 |
14 | #endif // MAVLINK_VERSION_H
15 |
--------------------------------------------------------------------------------
/app/mavlink/src/main/cpp/mavlink/mavlink_get_info.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifdef MAVLINK_USE_MESSAGE_INFO
4 | #define MAVLINK_HAVE_GET_MESSAGE_INFO
5 |
6 | /*
7 | return the message_info struct for a message
8 | */
9 | MAVLINK_HELPER const mavlink_message_info_t *mavlink_get_message_info_by_id(uint32_t msgid)
10 | {
11 | static const mavlink_message_info_t mavlink_message_info[] = MAVLINK_MESSAGE_INFO;
12 | /*
13 | use a bisection search to find the right entry. A perfect hash may be better
14 | Note that this assumes the table is sorted with primary key msgid
15 | */
16 | uint32_t low=0, high=sizeof(mavlink_message_info)/sizeof(mavlink_message_info[0]);
17 | while (low < high) {
18 | uint32_t mid = (low+1+high)/2;
19 | if (msgid < mavlink_message_info[mid].msgid) {
20 | high = mid-1;
21 | continue;
22 | }
23 | if (msgid > mavlink_message_info[mid].msgid) {
24 | low = mid;
25 | continue;
26 | }
27 | low = mid;
28 | break;
29 | }
30 | if (mavlink_message_info[low].msgid == msgid) {
31 | return &mavlink_message_info[low];
32 | }
33 | return NULL;
34 | }
35 |
36 | /*
37 | return the message_info struct for a message
38 | */
39 | MAVLINK_HELPER const mavlink_message_info_t *mavlink_get_message_info(const mavlink_message_t *msg)
40 | {
41 | return mavlink_get_message_info_by_id(msg->msgid);
42 | }
43 |
44 | /*
45 | return the message_info struct for a message
46 | */
47 | MAVLINK_HELPER const mavlink_message_info_t *mavlink_get_message_info_by_name(const char *name)
48 | {
49 | static const struct { const char *name; uint32_t msgid; } mavlink_message_names[] = MAVLINK_MESSAGE_NAMES;
50 | /*
51 | use a bisection search to find the right entry. A perfect hash may be better
52 | Note that this assumes the table is sorted with primary key name
53 | */
54 | uint32_t low=0, high=sizeof(mavlink_message_names)/sizeof(mavlink_message_names[0]);
55 | while (low < high) {
56 | uint32_t mid = (low+1+high)/2;
57 | int cmp = strcmp(mavlink_message_names[mid].name, name);
58 | if (cmp == 0) {
59 | return mavlink_get_message_info_by_id(mavlink_message_names[mid].msgid);
60 | }
61 | if (cmp > 0) {
62 | high = mid-1;
63 | } else {
64 | low = mid;
65 | }
66 | }
67 | return NULL;
68 | }
69 | #endif // MAVLINK_USE_MESSAGE_INFO
70 |
71 |
72 |
--------------------------------------------------------------------------------
/app/mavlink/src/main/cpp/mavlink/mavlink_sha256.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/mavlink/src/main/cpp/mavlink/mavlink_sha256.h
--------------------------------------------------------------------------------
/app/mavlink/src/main/cpp/mavlink/minimal/mavlink.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | * @brief MAVLink comm protocol built from minimal.xml
3 | * @see http://mavlink.org
4 | */
5 | #pragma once
6 | #ifndef MAVLINK_H
7 | #define MAVLINK_H
8 |
9 | #define MAVLINK_PRIMARY_XML_IDX 0
10 |
11 | #ifndef MAVLINK_STX
12 | #define MAVLINK_STX 253
13 | #endif
14 |
15 | #ifndef MAVLINK_ENDIAN
16 | #define MAVLINK_ENDIAN MAVLINK_LITTLE_ENDIAN
17 | #endif
18 |
19 | #ifndef MAVLINK_ALIGNED_FIELDS
20 | #define MAVLINK_ALIGNED_FIELDS 1
21 | #endif
22 |
23 | #ifndef MAVLINK_CRC_EXTRA
24 | #define MAVLINK_CRC_EXTRA 1
25 | #endif
26 |
27 | #ifndef MAVLINK_COMMAND_24BIT
28 | #define MAVLINK_COMMAND_24BIT 1
29 | #endif
30 |
31 | #include "version.h"
32 | #include "minimal.h"
33 |
34 | #endif // MAVLINK_H
35 |
--------------------------------------------------------------------------------
/app/mavlink/src/main/cpp/mavlink/minimal/version.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | * @brief MAVLink comm protocol built from minimal.xml
3 | * @see http://mavlink.org
4 | */
5 | #pragma once
6 |
7 | #ifndef MAVLINK_VERSION_H
8 | #define MAVLINK_VERSION_H
9 |
10 | #define MAVLINK_BUILD_DATE "Tue Jan 22 2019"
11 | #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
12 | #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 9
13 |
14 | #endif // MAVLINK_VERSION_H
15 |
--------------------------------------------------------------------------------
/app/mavlink/src/main/cpp/mavlink/slugs/mavlink.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | * @brief MAVLink comm protocol built from slugs.xml
3 | * @see http://mavlink.org
4 | */
5 | #pragma once
6 | #ifndef MAVLINK_H
7 | #define MAVLINK_H
8 |
9 | #define MAVLINK_PRIMARY_XML_IDX 0
10 |
11 | #ifndef MAVLINK_STX
12 | #define MAVLINK_STX 253
13 | #endif
14 |
15 | #ifndef MAVLINK_ENDIAN
16 | #define MAVLINK_ENDIAN MAVLINK_LITTLE_ENDIAN
17 | #endif
18 |
19 | #ifndef MAVLINK_ALIGNED_FIELDS
20 | #define MAVLINK_ALIGNED_FIELDS 1
21 | #endif
22 |
23 | #ifndef MAVLINK_CRC_EXTRA
24 | #define MAVLINK_CRC_EXTRA 1
25 | #endif
26 |
27 | #ifndef MAVLINK_COMMAND_24BIT
28 | #define MAVLINK_COMMAND_24BIT 1
29 | #endif
30 |
31 | #include "version.h"
32 | #include "slugs.h"
33 |
34 | #endif // MAVLINK_H
35 |
--------------------------------------------------------------------------------
/app/mavlink/src/main/cpp/mavlink/slugs/version.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | * @brief MAVLink comm protocol built from slugs.xml
3 | * @see http://mavlink.org
4 | */
5 | #pragma once
6 |
7 | #ifndef MAVLINK_VERSION_H
8 | #define MAVLINK_VERSION_H
9 |
10 | #define MAVLINK_BUILD_DATE "Tue Jan 22 2019"
11 | #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
12 | #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
13 |
14 | #endif // MAVLINK_VERSION_H
15 |
--------------------------------------------------------------------------------
/app/mavlink/src/main/cpp/mavlink/standard/mavlink.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | * @brief MAVLink comm protocol built from standard.xml
3 | * @see http://mavlink.org
4 | */
5 | #pragma once
6 | #ifndef MAVLINK_H
7 | #define MAVLINK_H
8 |
9 | #define MAVLINK_PRIMARY_XML_IDX 0
10 |
11 | #ifndef MAVLINK_STX
12 | #define MAVLINK_STX 253
13 | #endif
14 |
15 | #ifndef MAVLINK_ENDIAN
16 | #define MAVLINK_ENDIAN MAVLINK_LITTLE_ENDIAN
17 | #endif
18 |
19 | #ifndef MAVLINK_ALIGNED_FIELDS
20 | #define MAVLINK_ALIGNED_FIELDS 1
21 | #endif
22 |
23 | #ifndef MAVLINK_CRC_EXTRA
24 | #define MAVLINK_CRC_EXTRA 1
25 | #endif
26 |
27 | #ifndef MAVLINK_COMMAND_24BIT
28 | #define MAVLINK_COMMAND_24BIT 1
29 | #endif
30 |
31 | #include "version.h"
32 | #include "standard.h"
33 |
34 | #endif // MAVLINK_H
35 |
--------------------------------------------------------------------------------
/app/mavlink/src/main/cpp/mavlink/standard/testsuite.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | * @brief MAVLink comm protocol testsuite generated from standard.xml
3 | * @see http://qgroundcontrol.org/mavlink/
4 | */
5 | #pragma once
6 | #ifndef STANDARD_TESTSUITE_H
7 | #define STANDARD_TESTSUITE_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | #ifndef MAVLINK_TEST_ALL
14 | #define MAVLINK_TEST_ALL
15 | static void mavlink_test_common(uint8_t, uint8_t, mavlink_message_t *last_msg);
16 | static void mavlink_test_standard(uint8_t, uint8_t, mavlink_message_t *last_msg);
17 |
18 | static void mavlink_test_all(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
19 | {
20 | mavlink_test_common(system_id, component_id, last_msg);
21 | mavlink_test_standard(system_id, component_id, last_msg);
22 | }
23 | #endif
24 |
25 | #include "../common/testsuite.h"
26 |
27 |
28 |
29 | static void mavlink_test_standard(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
30 | {
31 |
32 | }
33 |
34 | #ifdef __cplusplus
35 | }
36 | #endif // __cplusplus
37 | #endif // STANDARD_TESTSUITE_H
38 |
--------------------------------------------------------------------------------
/app/mavlink/src/main/cpp/mavlink/standard/version.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | * @brief MAVLink comm protocol built from standard.xml
3 | * @see http://mavlink.org
4 | */
5 | #pragma once
6 |
7 | #ifndef MAVLINK_VERSION_H
8 | #define MAVLINK_VERSION_H
9 |
10 | #define MAVLINK_BUILD_DATE "Tue Jan 22 2019"
11 | #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
12 | #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
13 |
14 | #endif // MAVLINK_VERSION_H
15 |
--------------------------------------------------------------------------------
/app/mavlink/src/main/cpp/mavlink/test/mavlink.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | * @brief MAVLink comm protocol built from test.xml
3 | * @see http://mavlink.org
4 | */
5 | #pragma once
6 | #ifndef MAVLINK_H
7 | #define MAVLINK_H
8 |
9 | #define MAVLINK_PRIMARY_XML_IDX 0
10 |
11 | #ifndef MAVLINK_STX
12 | #define MAVLINK_STX 253
13 | #endif
14 |
15 | #ifndef MAVLINK_ENDIAN
16 | #define MAVLINK_ENDIAN MAVLINK_LITTLE_ENDIAN
17 | #endif
18 |
19 | #ifndef MAVLINK_ALIGNED_FIELDS
20 | #define MAVLINK_ALIGNED_FIELDS 1
21 | #endif
22 |
23 | #ifndef MAVLINK_CRC_EXTRA
24 | #define MAVLINK_CRC_EXTRA 1
25 | #endif
26 |
27 | #ifndef MAVLINK_COMMAND_24BIT
28 | #define MAVLINK_COMMAND_24BIT 1
29 | #endif
30 |
31 | #include "version.h"
32 | #include "test.h"
33 |
34 | #endif // MAVLINK_H
35 |
--------------------------------------------------------------------------------
/app/mavlink/src/main/cpp/mavlink/test/test.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | * @brief MAVLink comm protocol generated from test.xml
3 | * @see http://mavlink.org
4 | */
5 | #pragma once
6 | #ifndef MAVLINK_TEST_H
7 | #define MAVLINK_TEST_H
8 |
9 | #ifndef MAVLINK_H
10 | #error Wrong include order: MAVLINK_TEST.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
11 | #endif
12 |
13 | #undef MAVLINK_THIS_XML_IDX
14 | #define MAVLINK_THIS_XML_IDX 0
15 |
16 | #ifdef __cplusplus
17 | extern "C" {
18 | #endif
19 |
20 | // MESSAGE LENGTHS AND CRCS
21 |
22 | #ifndef MAVLINK_MESSAGE_LENGTHS
23 | #define MAVLINK_MESSAGE_LENGTHS {}
24 | #endif
25 |
26 | #ifndef MAVLINK_MESSAGE_CRCS
27 | #define MAVLINK_MESSAGE_CRCS {{0, 103, 179, 0, 0, 0}}
28 | #endif
29 |
30 | #include "../protocol.h"
31 |
32 | #define MAVLINK_ENABLED_TEST
33 |
34 | // ENUM DEFINITIONS
35 |
36 |
37 |
38 | // MAVLINK VERSION
39 |
40 | #ifndef MAVLINK_VERSION
41 | #define MAVLINK_VERSION 3
42 | #endif
43 |
44 | #if (MAVLINK_VERSION == 0)
45 | #undef MAVLINK_VERSION
46 | #define MAVLINK_VERSION 3
47 | #endif
48 |
49 | // MESSAGE DEFINITIONS
50 | #include "./mavlink_msg_test_types.h"
51 |
52 | // base include
53 |
54 |
55 | #undef MAVLINK_THIS_XML_IDX
56 | #define MAVLINK_THIS_XML_IDX 0
57 |
58 | #if MAVLINK_THIS_XML_IDX == MAVLINK_PRIMARY_XML_IDX
59 | # define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_TEST_TYPES}
60 | # define MAVLINK_MESSAGE_NAMES {{ "TEST_TYPES", 0 }}
61 | # if MAVLINK_COMMAND_24BIT
62 | # include "../mavlink_get_info.h"
63 | # endif
64 | #endif
65 |
66 | #ifdef __cplusplus
67 | }
68 | #endif // __cplusplus
69 | #endif // MAVLINK_TEST_H
70 |
--------------------------------------------------------------------------------
/app/mavlink/src/main/cpp/mavlink/test/version.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | * @brief MAVLink comm protocol built from test.xml
3 | * @see http://mavlink.org
4 | */
5 | #pragma once
6 |
7 | #ifndef MAVLINK_VERSION_H
8 | #define MAVLINK_VERSION_H
9 |
10 | #define MAVLINK_BUILD_DATE "Tue Jan 22 2019"
11 | #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
12 | #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 179
13 |
14 | #endif // MAVLINK_VERSION_H
15 |
--------------------------------------------------------------------------------
/app/mavlink/src/main/cpp/mavlink/uAvionix/mavlink.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | * @brief MAVLink comm protocol built from uAvionix.xml
3 | * @see http://mavlink.org
4 | */
5 | #pragma once
6 | #ifndef MAVLINK_H
7 | #define MAVLINK_H
8 |
9 | #define MAVLINK_PRIMARY_XML_IDX 2
10 |
11 | #ifndef MAVLINK_STX
12 | #define MAVLINK_STX 253
13 | #endif
14 |
15 | #ifndef MAVLINK_ENDIAN
16 | #define MAVLINK_ENDIAN MAVLINK_LITTLE_ENDIAN
17 | #endif
18 |
19 | #ifndef MAVLINK_ALIGNED_FIELDS
20 | #define MAVLINK_ALIGNED_FIELDS 1
21 | #endif
22 |
23 | #ifndef MAVLINK_CRC_EXTRA
24 | #define MAVLINK_CRC_EXTRA 1
25 | #endif
26 |
27 | #ifndef MAVLINK_COMMAND_24BIT
28 | #define MAVLINK_COMMAND_24BIT 1
29 | #endif
30 |
31 | #include "version.h"
32 | #include "uAvionix.h"
33 |
34 | #endif // MAVLINK_H
35 |
--------------------------------------------------------------------------------
/app/mavlink/src/main/cpp/mavlink/uAvionix/version.h:
--------------------------------------------------------------------------------
1 | /** @file
2 | * @brief MAVLink comm protocol built from uAvionix.xml
3 | * @see http://mavlink.org
4 | */
5 | #pragma once
6 |
7 | #ifndef MAVLINK_VERSION_H
8 | #define MAVLINK_VERSION_H
9 |
10 | #define MAVLINK_BUILD_DATE "Tue Jan 22 2019"
11 | #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
12 | #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
13 |
14 | #endif // MAVLINK_VERSION_H
15 |
--------------------------------------------------------------------------------
/app/mavlink/src/main/java/com/geehe/mavlink/MavlinkNative.java:
--------------------------------------------------------------------------------
1 | package com.geehe.mavlink;
2 |
3 | import android.content.Context;
4 |
5 | public class MavlinkNative {
6 |
7 | // Used to load the 'mavlink' library on application startup.
8 | static {
9 | System.loadLibrary("mavlink");
10 | }
11 |
12 | public static native void nativeStart(Context context);
13 | public static native void nativeStop(Context context);
14 |
15 | // TODO: Use message queue from cpp for performance#
16 | // This initiates a 'call back' for the IVideoParams
17 | public static native void nativeCallBack(T t);
18 | }
--------------------------------------------------------------------------------
/app/mavlink/src/main/java/com/geehe/mavlink/MavlinkUpdate.java:
--------------------------------------------------------------------------------
1 | package com.geehe.mavlink;
2 |
3 | public interface MavlinkUpdate{
4 | void onNewMavlinkData(final MavlinkData data);
5 | }
--------------------------------------------------------------------------------
/app/mavlink/src/test/java/com/geehe/mavlink/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.geehe.mavlink;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/geehe/fpvue/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.geehe.fpvue;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.platform.app.InstrumentationRegistry;
6 | import androidx.test.ext.junit.runners.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24 | assertEquals("com.geehe.fpvue", appContext.getPackageName());
25 | }
26 | }
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
30 |
31 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/app/src/main/assets/gs.key:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/assets/gs.key
--------------------------------------------------------------------------------
/app/src/main/ic_launcher-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/ic_launcher-playstore.png
--------------------------------------------------------------------------------
/app/src/main/java/com/geehe/fpvue/DeviceFilterXmlParser.java:
--------------------------------------------------------------------------------
1 | package com.geehe.fpvue;
2 |
3 | import android.content.Context;
4 | import android.content.res.XmlResourceParser;
5 |
6 | import org.xmlpull.v1.XmlPullParser;
7 | import org.xmlpull.v1.XmlPullParserException;
8 | import org.xmlpull.v1.XmlPullParserFactory;
9 |
10 | import java.io.IOException;
11 | import java.io.InputStream;
12 | import java.util.ArrayList;
13 | import java.util.List;
14 |
15 | public class DeviceFilterXmlParser {
16 |
17 | public static List parseXml(Context context, int resourceId) throws XmlPullParserException, IOException {
18 | List devices = new ArrayList<>();
19 | XmlResourceParser parser = context.getResources().getXml(resourceId);
20 |
21 | int eventType = parser.getEventType();
22 | while (eventType != XmlResourceParser.END_DOCUMENT) {
23 | if (eventType == XmlResourceParser.START_TAG) {
24 | String tag = parser.getName();
25 | if (tag.equals("usb-device")) {
26 | String vendorIdString = parser.getAttributeValue(null, "vendor-id");
27 | String productIdString = parser.getAttributeValue(null, "product-id");
28 |
29 | int vendorId = Integer.parseInt(vendorIdString, 10);
30 | int productId = Integer.parseInt(productIdString, 10);
31 |
32 | UsbDeviceFilter device = new UsbDeviceFilter(vendorId, productId);
33 | devices.add(device);
34 | }
35 | }
36 | eventType = parser.next();
37 | }
38 | return devices;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/app/src/main/java/com/geehe/fpvue/SettingsChanged.java:
--------------------------------------------------------------------------------
1 | package com.geehe.fpvue;
2 |
3 | public interface SettingsChanged {
4 | void onChannelSettingChanged(final int channel);
5 | void onCodecSettingChanged(final String codec);
6 | }
7 |
--------------------------------------------------------------------------------
/app/src/main/java/com/geehe/fpvue/UsbDeviceFilter.java:
--------------------------------------------------------------------------------
1 | package com.geehe.fpvue;
2 |
3 | public class UsbDeviceFilter {
4 | public int venderId;
5 | public int productId;
6 |
7 | public UsbDeviceFilter(int vid, int pid) {
8 | venderId = vid;
9 | productId = pid;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/app/src/main/java/com/geehe/fpvue/osd/MovableLayout.java:
--------------------------------------------------------------------------------
1 | package com.geehe.fpvue.osd;
2 |
3 | import android.content.Context;
4 | import android.content.SharedPreferences;
5 | import android.graphics.Point;
6 | import android.util.AttributeSet;
7 | import android.util.Log;
8 | import android.view.WindowManager;
9 | import android.view.Display;
10 | import android.view.MotionEvent;
11 | import android.widget.LinearLayout;
12 |
13 | public class MovableLayout extends LinearLayout {
14 | private float dX, dY;
15 | private SharedPreferences preferences;
16 | private boolean isMovable = false;
17 | private float defaultX,defaultY;
18 |
19 | private String prefName;
20 |
21 | public MovableLayout(Context context) {
22 | super(context);
23 | init(context);
24 | }
25 |
26 | public MovableLayout(Context context, AttributeSet attrs) {
27 | super(context, attrs);
28 | init(context);
29 | }
30 |
31 | public MovableLayout(Context context, AttributeSet attrs, int defStyleAttr) {
32 | super(context, attrs, defStyleAttr);
33 | init(context);
34 | }
35 |
36 | private void init(Context context) {
37 | preferences = context.getSharedPreferences("movable_layout_prefs", Context.MODE_PRIVATE);
38 |
39 | WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
40 | Display display = windowManager.getDefaultDisplay();
41 | Point displaySize = new Point();
42 | display.getRealSize(displaySize);
43 |
44 | defaultX = (float) displaySize.x / 2 - ((float)displaySize.y/8);
45 | defaultY = (float) displaySize.y / 2 - ((float)displaySize.y/4);
46 | }
47 |
48 | @Override
49 | public boolean onTouchEvent(MotionEvent event) {
50 | if(!isMovable) return false;
51 |
52 | switch (event.getAction()) {
53 | case MotionEvent.ACTION_DOWN:
54 | dX = this.getX() - event.getRawX();
55 | dY = this.getY() - event.getRawY();
56 | break;
57 | case MotionEvent.ACTION_MOVE:
58 | this.animate()
59 | .x(event.getRawX() + dX)
60 | .y(event.getRawY() + dY)
61 | .setDuration(0)
62 | .start();
63 | break;
64 | case MotionEvent.ACTION_UP:
65 | savePosition();
66 | break;
67 | default:
68 | return false;
69 | }
70 | return true;
71 | }
72 |
73 | private void savePosition() {
74 | SharedPreferences.Editor editor = preferences.edit();
75 | editor.putFloat(prefName + "_x", getX());
76 | editor.putFloat(prefName + "_y", getY());
77 | editor.apply();
78 | }
79 |
80 | public void restorePosition(String prefName_) {
81 | prefName=prefName_;
82 | float x = preferences.getFloat(prefName + "_x", defaultX);
83 | float y = preferences.getFloat(prefName + "_y", defaultY);
84 | setX(x);
85 | setY(y);
86 | }
87 |
88 | public void setMovable(boolean movable) {
89 | isMovable = movable;
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/app/src/main/java/com/geehe/fpvue/osd/OSDElement.java:
--------------------------------------------------------------------------------
1 | package com.geehe.fpvue.osd;
2 |
3 | import android.content.Context;
4 |
5 | public class OSDElement{
6 | public String name;
7 | public MovableLayout layout;
8 |
9 | public OSDElement(String n, MovableLayout l) {
10 | name = n;
11 | layout = l;
12 | }
13 |
14 | public String prefName() {
15 | return String.format("%d",name.hashCode());
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/air_speed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/air_speed.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/alt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/alt.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/amp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/amp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/armed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/armed.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/baseline_battery_0_bar_24.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/baseline_battery_1_bar_24.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/baseline_battery_2_bar_24.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/baseline_battery_3_bar_24.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/baseline_battery_4_bar_24.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/baseline_battery_5_bar_24.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/baseline_battery_6_bar_24.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/baseline_battery_charging_full_24.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/baseline_battery_full_24.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/baseline_fiber_manual_record_24.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/baseline_import_export_24.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/baseline_personal_video_24.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/baseline_settings_24.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/battery.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/battery.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/celsius.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/celsius.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/circle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/circle.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/compass.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/compass.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/cross_hair.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/cross_hair.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/dis.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/dis.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/disarmed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/disarmed.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/fahrenheit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/fahrenheit.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/gnd_speed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/gnd_speed.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/home.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/home_dist.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/home_dist.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
15 |
18 |
21 |
22 |
23 |
24 |
30 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/kmh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/kmh.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/lat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/lat.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/link.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/link.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/lon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/lon.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ms.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/ms.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/navigation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/navigation.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/navigation_rev.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/navigation_rev.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/pitch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/pitch.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/roll.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/roll.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/rssi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/rssi.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/sat1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/sat1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/sat2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/sat2.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/timer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/timer.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/wnd_speed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/drawable/wnd_speed.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/mipmap-anydpi/icon.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/mipmap-hdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/mipmap-mdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/values-night/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/values/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #2F2F2F
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | FPVue 0.19
3 |
4 | - h265
5 | - h264
6 |
7 |
8 | - 1
9 | - 2
10 | - 3
11 | - 4
12 | - 5
13 | - 6
14 | - 7
15 | - 8
16 | - 9
17 | - 10
18 | - 11
19 | - 12
20 | - 13
21 | - 32
22 | - 36
23 | - 40
24 | - 44
25 | - 48
26 | - 52
27 | - 56
28 | - 60
29 | - 64
30 | - 68
31 | - 96
32 | - 100
33 | - 104
34 | - 108
35 | - 112
36 | - 116
37 | - 120
38 | - 124
39 | - 128
40 | - 132
41 | - 136
42 | - 140
43 | - 144
44 | - 149
45 | - 153
46 | - 157
47 | - 161
48 | - 169
49 | - 173
50 | - 177
51 |
52 |
--------------------------------------------------------------------------------
/app/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/backup_rules.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/data_extraction_rules.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
12 |
13 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/usb_device_filter.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/test/java/com/geehe/fpvue/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.geehe.fpvue;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/app/videonative/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app/videonative/build.gradle.kts:
--------------------------------------------------------------------------------
1 | import com.android.build.api.dsl.Packaging
2 |
3 | plugins {
4 | alias(libs.plugins.androidLibrary)
5 | }
6 |
7 |
8 |
9 | android {
10 | namespace = "com.geehe.videonative"
11 | compileSdk = 34
12 |
13 | defaultConfig {
14 | minSdk = 26
15 | testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
16 | consumerProguardFiles("consumer-rules.pro")
17 | ndk {
18 | debugSymbolLevel = "FULL"
19 | }
20 | // externalNativeBuild {
21 | // cmake {
22 | // cppFlags "-std=c++17"
23 | // arguments "-DANDROID_STL=c++_shared"
24 | // }
25 | // }
26 |
27 | }
28 |
29 | buildTypes {
30 | release {
31 | isMinifyEnabled = false
32 | proguardFiles(
33 | getDefaultProguardFile("proguard-android-optimize.txt"),
34 | "proguard-rules.pro"
35 | )
36 | }
37 | }
38 | externalNativeBuild {
39 | cmake {
40 | path("src/main/cpp/CMakeLists.txt")
41 | version = "3.22.1"
42 | }
43 | }
44 | compileOptions {
45 | sourceCompatibility = JavaVersion.VERSION_1_8
46 | targetCompatibility = JavaVersion.VERSION_1_8
47 | }
48 | }
49 |
50 | dependencies {
51 | implementation(libs.appcompat)
52 | implementation(libs.material)
53 | implementation(libs.constraintlayout)
54 |
55 | testImplementation(libs.junit)
56 | androidTestImplementation(libs.ext.junit)
57 |
58 | androidTestImplementation(libs.espresso.core)
59 | }
--------------------------------------------------------------------------------
/app/videonative/consumer-rules.pro:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gehee/FPVue_android/9cfb6d91e520cdd410ac29ebe2bb216ecf6e3287/app/videonative/consumer-rules.pro
--------------------------------------------------------------------------------
/app/videonative/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/app/videonative/src/main/cpp/CMakeLists.txt:
--------------------------------------------------------------------------------
1 |
2 | cmake_minimum_required(VERSION 3.6)
3 |
4 | project("VideoNative")
5 |
6 | add_library(${CMAKE_PROJECT_NAME} SHARED
7 | parser/H26XParser.cpp
8 | parser/ParseRTP.cpp
9 | UdpReceiver.cpp
10 | VideoDecoder.cpp
11 | VideoPlayer.cpp)
12 |
13 |
14 | target_link_libraries(${CMAKE_PROJECT_NAME}
15 | # List libraries link to the target library
16 | android
17 | mediandk
18 | log)
19 |
20 | set_property(TARGET ${CMAKE_PROJECT_NAME} PROPERTY CXX_STANDARD 20)
21 | target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE -fno-omit-frame-pointer)
--------------------------------------------------------------------------------
/app/videonative/src/main/cpp/NALU/KeyFrameFinder.hpp:
--------------------------------------------------------------------------------
1 | //
2 | // Created by geier on 07/02/2020.
3 | //
4 |
5 | #ifndef FPVUE_KEYFRAMEFINDER_HPP
6 | #define FPVUE_KEYFRAMEFINDER_HPP
7 |
8 | #include "NALU.hpp"
9 | #include
10 | #include "../helper/AndroidLogger.hpp"
11 | #include
12 |
13 | // Takes a continuous stream of NALUs and save SPS / PPS data
14 | // For later use
15 | class KeyFrameFinder{
16 | private:
17 | std::unique_ptr SPS=nullptr;
18 | std::unique_ptr PPS=nullptr;
19 | // VPS are only used in H265
20 | std::unique_ptr VPS=nullptr;
21 | public:
22 | bool saveIfKeyFrame(const NALU &nalu){
23 | if(nalu.getSize()<=0)return false;
24 | if(nalu.isSPS()){
25 | SPS=std::make_unique(nalu);
26 | //MLOGD<<"SPS found";
27 | //MLOGD<(nalu);
31 | //MLOGD<<"PPS found";
32 | return true;
33 | }else if(nalu.IS_H265_PACKET && nalu.isVPS()){
34 | VPS=std::make_unique(nalu);
35 | //MLOGD<<"VPS found";
36 | return true;
37 | }
38 | //qDebug()<<"not a keyframe"<<(int)nalu.getDataWithoutPrefix()[0];
39 | return false;
40 | }
41 | // H264 needs sps and pps
42 | // H265 needs sps,pps and vps
43 | bool allKeyFramesAvailable(const bool IS_H265=false){
44 | if(IS_H265){
45 | return SPS != nullptr && PPS != nullptr && VPS!=nullptr;
46 | }
47 | return SPS != nullptr && PPS != nullptr;
48 | }
49 | //SPS
50 | const NALU& getCSD0()const{
51 | assert(SPS);
52 | return SPS->get_nal();
53 | }
54 | const NALU& getCSD1()const{
55 | assert(PPS);
56 | return PPS->get_nal();
57 | }
58 | const NALU& getVPS()const{
59 | assert(VPS);
60 | return VPS->get_nal();
61 | }
62 | static void appendNaluData(std::vector& buff,const NALU& nalu){
63 | buff.insert(buff.begin(),nalu.getData(),nalu.getData()+nalu.getSize());
64 | }
65 | void reset(){
66 | SPS=nullptr;
67 | PPS=nullptr;
68 | VPS=nullptr;
69 | }
70 | };
71 |
72 | #endif //FPVUE_KEYFRAMEFINDER_HPP
73 |
--------------------------------------------------------------------------------
/app/videonative/src/main/cpp/UdpReceiver.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by gaeta on 2024-04-01.
3 | //
4 |
5 | #ifndef FPVUE_UDPRECEIVER_H
6 | #define FPVUE_UDPRECEIVER_H
7 |
8 |
9 | #include
10 | #include
11 | #include
12 | #include
13 | #include
14 | #include
15 | #include
16 | #include
17 | //Starts a new thread that continuously checks for new data on UDP port
18 |
19 | class UDPReceiver {
20 | public:
21 | typedef std::function DATA_CALLBACK;
22 | typedef std::function SOURCE_IP_CALLBACK;
23 | public:
24 | /**
25 | * @param javaVm used to set thread priority (attach and then detach) for android,
26 | nullptr when priority doesn't matter/not using android
27 | * @param port : The port to listen on
28 | * @param CPUPriority: The priority the receiver thread will run with if javaVm!=nullptr
29 | * @param onDataReceivedCallback: called every time new data is received
30 | * @param WANTED_RCVBUF_SIZE: The buffer allocated by the OS might not be sufficient to buffer incoming data when receiving at a high data rate
31 | * If @param WANTED_RCVBUF_SIZE is bigger than the size allocated by the OS a bigger buffer is requested, but it is not
32 | * guaranteed that the size is actually increased. Use 0 to leave the buffer size untouched
33 | */
34 | UDPReceiver(JavaVM* javaVm,int port,std::string name,int CPUPriority,DATA_CALLBACK onDataReceivedCallback,size_t WANTED_RCVBUF_SIZE=0);
35 | /**
36 | * Register a callback that is called once and contains the IP address of the first received packet's sender
37 | */
38 | void registerOnSourceIPFound(SOURCE_IP_CALLBACK onSourceIP1);
39 | /**
40 | * Start receiver thread,which opens UDP port
41 | */
42 | void startReceiving();
43 | /**
44 | * Stop and join receiver thread, which closes port
45 | */
46 | void stopReceiving();
47 | //Get function(s) for private member variables
48 | long getNReceivedBytes()const;
49 | std::string getSourceIPAddress()const;
50 | int getPort()const;
51 | private:
52 | void receiveFromUDPLoop();
53 | const DATA_CALLBACK onDataReceivedCallback=nullptr;
54 | SOURCE_IP_CALLBACK onSourceIP= nullptr;
55 | const int mPort;
56 | const int mCPUPriority;
57 | // Hmm....
58 | const size_t WANTED_RCVBUF_SIZE;
59 | const std::string mName;
60 | ///We need this reference to stop the receiving thread
61 | int mSocket=0;
62 | std::string senderIP="0.0.0.0";
63 | std::atomic receiving=false;
64 | std::atomic nReceivedBytes=0;
65 | std::unique_ptr mUDPReceiverThread;
66 | //https://en.wikipedia.org/wiki/User_Datagram_Protocol
67 | //65,507 bytes (65,535 − 8 byte UDP header − 20 byte IP header).
68 | static constexpr const size_t UDP_PACKET_MAX_SIZE=65507;
69 | JavaVM* javaVm;
70 | };
71 |
72 | #endif //FPVUE_UDPRECEIVER_H
73 |
--------------------------------------------------------------------------------
/app/videonative/src/main/cpp/VideoPlayer.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Constantin on 1/9/2019.
3 | //
4 |
5 | #ifndef FPV_VR_VIDEOPLAYERN_H
6 | #define FPV_VR_VIDEOPLAYERN_H
7 |
8 | #include
9 | #include "VideoDecoder.h"
10 | #include "UdpReceiver.h"
11 | #include "parser/H26XParser.h"
12 | #include "minimp4.h"
13 | #include
14 | #include
15 | #include
16 | #include
17 | #include "time_util.h"
18 |
19 | class VideoPlayer{
20 |
21 | public:
22 | VideoPlayer(JNIEnv * env, jobject context);
23 | enum VIDEO_DATA_TYPE{RTP_H264,RAW_H264,RTP_H265,RAW_H265};
24 | void onNewVideoData(const uint8_t* data,const std::size_t data_length,const VIDEO_DATA_TYPE videoDataType);
25 | /*
26 | * Set the surface the decoder can be configured with. When @param surface==nullptr
27 | * It is guaranteed that the surface is not used by the decoder anymore when this call returns
28 | */
29 | void setVideoSurface(JNIEnv* env, jobject surface);
30 | /*
31 | * Start the receiver and ground recorder if enabled
32 | */
33 | void start(JNIEnv *env,jobject androidContext, jstring codec);
34 | /**
35 | * Stop the receiver and ground recorder if enabled
36 | */
37 | void stop(JNIEnv *env,jobject androidContext);
38 | /*
39 | * Returns a string with the current configuration for debugging
40 | */
41 | std::string getInfoString()const;
42 |
43 | void startDvr(JNIEnv *env,jint fd, jint fmp4_enabled);
44 | void stopDvr();
45 |
46 | bool isRecording() {
47 | return (get_time_ms() - last_dvr_write) <= 500;
48 | }
49 |
50 | private:
51 | void onNewNALU(const NALU& nalu);
52 | //Assumptions: Max bitrate: 40 MBit/s, Max time to buffer: 100ms
53 | //5 MB should be plenty !
54 | static constexpr const size_t WANTED_UDP_RCVBUF_SIZE=1024*1024*5;
55 | // Retrieve settings from shared preferences
56 | enum SOURCE_TYPE_OPTIONS{UDP,FILE,ASSETS,VIA_FFMPEG_URL,EXTERNAL};
57 | const std::string GROUND_RECORDING_DIRECTORY;
58 | JavaVM* javaVm=nullptr;
59 | H26XParser mParser;
60 |
61 | // DVR attributes
62 | int dvr_fd;
63 | std::queue naluQueue;
64 | std::mutex mtx;
65 | std::condition_variable cv;
66 | bool stopFlag = false;
67 | std::thread processingThread;
68 | int dvr_mp4_fragmentation = 0;
69 | uint64_t last_dvr_write = 0;
70 |
71 | void enqueueNALU(const NALU& nalu) {
72 | {
73 | std::lock_guard lock(mtx);
74 | naluQueue.push(nalu);
75 | }
76 | cv.notify_one();
77 | }
78 |
79 | void startProcessing() {
80 | stopFlag = false;
81 | processingThread = std::thread(&VideoPlayer::processQueue, this);
82 | }
83 |
84 | void stopProcessing() {
85 | {
86 | std::lock_guard lock(mtx);
87 | stopFlag = true;
88 | }
89 | cv.notify_all();
90 | if (processingThread.joinable()) {
91 | processingThread.join();
92 | }
93 | }
94 |
95 | void processQueue();
96 |
97 | public:
98 | VideoDecoder videoDecoder;
99 | std::unique_ptr mUDPReceiver;
100 | long nNALUsAtLastCall=0;
101 |
102 | public:
103 | DecodingInfo latestDecodingInfo{};
104 | std::atomic latestDecodingInfoChanged=false;
105 | VideoRatio latestVideoRatio{};
106 | std::atomic latestVideoRatioChanged=false;
107 |
108 | bool lastFrameWasAUD=false;
109 | };
110 |
111 | #endif //FPV_VR_VIDEOPLAYERN_H
112 |
--------------------------------------------------------------------------------
/app/videonative/src/main/cpp/helper/AndroidMediaFormatHelper.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef FPVUE_ANDROIDMEDIAFORMATHELPER_H
3 | #define FPVUE_ANDROIDMEDIAFORMATHELPER_H
4 |
5 | #include "../NALU/KeyFrameFinder.hpp"
6 | #include
7 |
8 | // Some of these params are only supported on the latest Android versions
9 | // However,writing them has no negative affect on devices with older Android versions
10 | // Note that for example the low-latency key cannot fix any issues like the 'VUI' issue
11 | void writeAndroidPerformanceParams(AMediaFormat* format){
12 | // I think: KEY_LOW_LATENCY is for decoder. But it doesn't really make a difference anyways
13 | static const auto PARAMETER_KEY_LOW_LATENCY="low-latency";
14 | AMediaFormat_setInt32(format,PARAMETER_KEY_LOW_LATENCY,1);
15 | // Lower values mean higher priority
16 | // Works on pixel 3 (look at output format description)
17 | static const auto AMEDIAFORMAT_KEY_PRIORITY="priority";
18 | AMediaFormat_setInt32(format,AMEDIAFORMAT_KEY_PRIORITY,0);
19 | // set operating rate ? - doesn't make a difference
20 | //static const auto AMEDIAFORMAT_KEY_OPERATING_RATE="operating-rate";
21 | //AMediaFormat_setInt32(format,AMEDIAFORMAT_KEY_OPERATING_RATE,60);
22 | //
23 | //AMEDIAFORMAT_KEY_LOW_LATENCY;
24 | //AMEDIAFORMAT_KEY_LATENCY;
25 | //AMediaFormat_setInt32(format,AMEDIAFORMAT_KEY_LATENCY,0);
26 | //AMediaFormat_setInt32(format,AMEDIAFORMAT_KEY_OPERATING_RATE,0);
27 | }
28 |
29 | static void h264_configureAMediaFormat(KeyFrameFinder& kff,AMediaFormat* format){
30 | const auto sps=kff.getCSD0();
31 | const auto pps=kff.getCSD1();
32 | const auto videoWH= sps.getVideoWidthHeightSPS();
33 | AMediaFormat_setInt32(format,AMEDIAFORMAT_KEY_WIDTH,videoWH[0]);
34 | AMediaFormat_setInt32(format,AMEDIAFORMAT_KEY_HEIGHT,videoWH[1]);
35 | AMediaFormat_setBuffer(format,"csd-0",sps.getData(),(size_t)sps.getSize());
36 | AMediaFormat_setBuffer(format,"csd-1",pps.getData(),(size_t)pps.getSize());
37 | MLOGD<<"Video WH:"< buff={};
47 | const auto sps=kff.getCSD0();
48 | const auto pps=kff.getCSD1();
49 | const auto vps=kff.getVPS();
50 | buff.reserve(sps.getSize() + pps.getSize() + vps.getSize());
51 | KeyFrameFinder::appendNaluData(buff, vps);
52 | KeyFrameFinder::appendNaluData(buff, sps);
53 | KeyFrameFinder::appendNaluData(buff, pps);
54 | const auto videoWH= sps.getVideoWidthHeightSPS();
55 | AMediaFormat_setInt32(format,AMEDIAFORMAT_KEY_WIDTH,videoWH[0]);
56 | AMediaFormat_setInt32(format,AMEDIAFORMAT_KEY_HEIGHT,videoWH[1]);
57 | AMediaFormat_setBuffer(format,"csd-0",buff.data(),buff.size());
58 | MLOGD<<"Video WH:"<
6 | #include
7 | #include
8 | #include
9 | #include
10 |
11 | H26XParser::H26XParser(NALU_DATA_CALLBACK onNewNALU):
12 | onNewNALU(std::move(onNewNALU)),
13 | mDecodeRTP(std::bind(&H26XParser::onNewNaluDataExtracted, this, std::placeholders::_1,std::placeholders::_2,std::placeholders::_3)){
14 | }
15 |
16 | void H26XParser::reset(){
17 | mDecodeRTP.reset();
18 | nParsedNALUs=0;
19 | nParsedKonfigurationFrames=0;
20 | }
21 |
22 | void H26XParser::parse_raw_h264_stream(const uint8_t *data, const size_t data_length) {
23 | //mParseRAW.parseData(data,data_length);
24 | }
25 |
26 | void H26XParser::parse_raw_h265_stream(const uint8_t *data, const size_t data_length) {
27 | //mParseRAW.parseData(data,data_length,true);
28 | }
29 |
30 | void H26XParser::parse_rtp_h264_stream(const uint8_t *rtp_data, const size_t data_length) {
31 | mDecodeRTP.parseRTPH264toNALU(rtp_data, data_length);
32 | }
33 |
34 | void H26XParser::parse_rtp_h265_stream(const uint8_t *rtp_data, const size_t data_length) {
35 | IS_H265=true;
36 | mDecodeRTP.parseRTPH265toNALU(rtp_data, data_length);
37 | }
38 |
39 | void H26XParser::onNewNaluDataExtracted(const std::chrono::steady_clock::time_point creation_time,
40 | const uint8_t *nalu_data, const int nalu_data_size) {
41 | NALU nalu(nalu_data, nalu_data_size, IS_H265, creation_time);
42 | newNaluExtracted(nalu);
43 | }
44 |
45 | void H26XParser::newNaluExtracted(const NALU& nalu) {
46 | if(onNewNALU!= nullptr){
47 | onNewNALU(nalu);
48 | }
49 | nParsedNALUs++;
50 | const bool sps_or_pps=nalu.isSPS() || nalu.isPPS();
51 | if(sps_or_pps){
52 | nParsedKonfigurationFrames++;
53 | }
54 | }
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/app/videonative/src/main/cpp/parser/H26XParser.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Constantin on 24.01.2018.
3 | //
4 |
5 | #ifndef FPV_VR_PARSE2H264RAW_H
6 | #define FPV_VR_PARSE2H264RAW_H
7 |
8 | #include
9 | #include
10 |
11 | /**
12 | * Input:
13 | * 1) rtp packets (h264/h265)
14 | * 2) raw packets (h264/h265)
15 | * Output:
16 | * NAL units in the onNewNalu callback, one after another
17 | */
18 | //
19 |
20 | #include "../NALU/NALU.hpp"
21 |
22 | #include "ParseRTP.h"
23 |
24 | //
25 | #include