├── .clang-format ├── .github └── workflows │ └── build.yml ├── .gitignore ├── .gitmodules ├── LICENSE ├── README.md ├── app ├── .gitignore ├── build.gradle ├── mavlink │ ├── .gitignore │ ├── build.gradle │ └── src │ │ └── main │ │ ├── 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 │ │ └── openipc │ │ └── mavlink │ │ ├── MavlinkData.java │ │ ├── MavlinkNative.java │ │ └── MavlinkUpdate.java ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ ├── assets │ │ └── gs.key │ │ ├── ic_launcher-playstore.png │ │ ├── java │ │ └── com │ │ │ └── openipc │ │ │ └── pixelpilot │ │ │ ├── SettingsChanged.java │ │ │ ├── UsbDeviceFilter.java │ │ │ ├── VideoActivity.java │ │ │ ├── WfbLinkManager.java │ │ │ ├── WfbNgVpnService.java │ │ │ └── osd │ │ │ ├── MovableLayout.java │ │ │ ├── OSDElement.java │ │ │ └── OSDManager.java │ │ └── 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 │ │ ├── record.png │ │ ├── recording.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 │ │ ├── file_paths.xml │ │ └── usb_device_filter.xml ├── videonative │ ├── .gitignore │ ├── build.gradle │ └── src │ │ └── main │ │ ├── cpp │ │ ├── .clang-format │ │ ├── AndroidThreadPrioValues.hpp │ │ ├── AudioDecoder.cpp │ │ ├── AudioDecoder.h │ │ ├── BufferedPacketQueue.h │ │ ├── CMakeLists.txt │ │ ├── NALU │ │ │ ├── H26X.hpp │ │ │ ├── KeyFrameFinder.hpp │ │ │ ├── NALU.hpp │ │ │ └── NALUnitType.hpp │ │ ├── UdpReceiver.cpp │ │ ├── UdpReceiver.h │ │ ├── UdsReceiver.cpp │ │ ├── UdsReceiver.h │ │ ├── VideoDecoder.cpp │ │ ├── VideoDecoder.h │ │ ├── VideoPlayer.cpp │ │ ├── VideoPlayer.h │ │ ├── helper │ │ │ ├── AndroidLogger.hpp │ │ │ ├── AndroidMediaFormatHelper.h │ │ │ ├── NDKArrayHelper.hpp │ │ │ ├── NDKHelper.hpp │ │ │ ├── NDKThreadHelper.hpp │ │ │ ├── StringHelper.hpp │ │ │ └── TimeHelper.hpp │ │ ├── libs │ │ │ ├── arm64-v8a │ │ │ │ ├── libopus.so │ │ │ │ └── libopusenc.so │ │ │ ├── armeabi-v7a │ │ │ │ ├── libopus.so │ │ │ │ └── libopusenc.so │ │ │ └── include │ │ │ │ ├── opus.h │ │ │ │ ├── opus_custom.h │ │ │ │ ├── opus_defines.h │ │ │ │ ├── opus_multistream.h │ │ │ │ ├── opus_projection.h │ │ │ │ ├── opus_types.h │ │ │ │ └── opusenc.h │ │ ├── minimp4.h │ │ ├── parser │ │ │ ├── H26XParser.cpp │ │ │ ├── H26XParser.h │ │ │ ├── ParseRTP.cpp │ │ │ ├── ParseRTP.h │ │ │ └── RTP.hpp │ │ ├── scripts │ │ │ └── format.sh │ │ ├── tests │ │ │ ├── BufferedPacketQueue_test.cpp │ │ │ └── CMakeLists.txt │ │ └── time_util.h │ │ └── java │ │ └── com │ │ └── openipc │ │ └── videonative │ │ ├── AspectFrameLayout.java │ │ ├── DecodingInfo.java │ │ ├── ISurfaceTextureAvailable.java │ │ ├── IVideoParamsChanged.java │ │ └── VideoPlayer.java └── wfbngrtl8812 │ ├── .gitignore │ ├── build.gradle │ └── src │ └── main │ ├── cpp │ ├── CMakeLists.txt │ ├── FecChangeController.h │ ├── RxFrame.cpp │ ├── RxFrame.h │ ├── SignalQualityCalculator.cpp │ ├── SignalQualityCalculator.h │ ├── TxFrame.cpp │ ├── TxFrame.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 │ └── wfb_log.h │ └── java │ └── com │ └── openipc │ └── wfbngrtl8812 │ ├── WfbNGStats.java │ ├── WfbNGStatsChanged.java │ └── WfbNgLink.java ├── build.gradle ├── gradle.properties ├── gradle ├── libs.versions.toml └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── scripts └── format_sources.sh └── settings.gradle /.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: LLVM 2 | IndentWidth: 4 3 | UseTab: Never 4 | BreakBeforeBraces: Attach 5 | ColumnLimit: 120 6 | PointerAlignment: Right 7 | ReferenceAlignment: Right 8 | ConstructorInitializerIndentWidth: 8 9 | BinPackArguments: false 10 | BinPackParameters: false 11 | SpacesInParentheses: false 12 | SpaceBeforeParens: ControlStatements 13 | AlignTrailingComments: true 14 | SortIncludes: true 15 | AllowShortIfStatementsOnASingleLine: true 16 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | on: 3 | push: 4 | branches: 5 | - 'master' 6 | tags: 7 | - 'v[0-9]+.[0-9]+.[0-9]+' 8 | workflow_dispatch: 9 | 10 | permissions: 11 | contents: write 12 | 13 | jobs: 14 | build: 15 | environment: ANDROID_KEYSTORE 16 | runs-on: ubuntu-latest 17 | steps: 18 | - name: Checkout 19 | uses: actions/checkout@v4 20 | with: 21 | submodules: recursive 22 | 23 | - name: Set up JDK 17 24 | uses: actions/setup-java@v3 25 | with: 26 | java-version: '17' 27 | distribution: 'temurin' 28 | cache: gradle 29 | 30 | - name: Decode Keystore 31 | run: | 32 | echo "${{ secrets.ANDROID_KEYSTORE }}" | base64 -d > pixelpilot.jks 33 | 34 | - name: Build APK 35 | env: 36 | KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} 37 | KEYSTORE_PATH: ${{ github.workspace }}/pixelpilot.jks 38 | run: | 39 | ./gradlew assembleRelease -Pandroid.injected.signing.store.file=$KEYSTORE_PATH \ 40 | -Pandroid.injected.signing.store.password=$KEYSTORE_PASSWORD \ 41 | -Pandroid.injected.signing.key.alias=pixelpilot \ 42 | -Pandroid.injected.signing.key.password=$KEYSTORE_PASSWORD 43 | mv app/build/outputs/apk/release/app-release.apk PixelPilot.apk 44 | 45 | - name: Upload Release 46 | uses: softprops/action-gh-release@v2 47 | with: 48 | tag_name: ${{ github.ref_name == 'master' && 'latest' || github.ref_name }} 49 | files: PixelPilot.apk 50 | -------------------------------------------------------------------------------- /.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 | /app/mavlink/compile_commands.json 20 | /app/videonative/compile_commands.json 21 | /app/wfbngrtl8812/compile_commands.json 22 | /compile_commands.json 23 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "app/wfbngrtl8812/src/main/cpp/devourer"] 2 | path = app/wfbngrtl8812/src/main/cpp/devourer 3 | url = https://github.com/openipc/devourer.git 4 | branch = master 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 | # PixelPilot 2 | > [!IMPORTANT] 3 | > Warning, performance will heavily depend on your device's processing power. 4 | > 5 | > Use this app at your own risk. 6 | 7 | ## Introduction 8 | ``` 9 | PixelPilot – the Android FPV app that leaves “loading…” screens in the dust. 10 | Plug in, fly live with sub‑atomic latency, flex real‑time signal stats, and marvel at the open‑source unicorn 11 | where (brace yourself) most things actually work. 12 | ``` 13 | 14 | - [FPVue_android](https://github.com/gehee/FPVue_android): basic and unique work to combine all components into a single application by [Gee He](https://github.com/gehee). 15 | - [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). 16 | - [LiveVideo10ms](https://github.com/Consti10/LiveVideo10ms): excellent video decoder from [Consti10](https://github.com/Consti10) converted into a module. 17 | - [wfb-ng](https://github.com/svpcom/wfb-ng): library allowing the broadcast of the video feed over the air. 18 | 19 | The wfb-ng [gs.key](https://github.com/OpenIPC/PixelPilot/raw/main/app/src/main/assets/gs.key) is embedded in the app. 20 | The settings menu allows selecting a different key from your phone. 21 | 22 | Supported rtl8812au wifi adapter are listed [here](https://github.com/OpenIPC/PixelPilot/blob/master/app/src/main/res/xml/usb_device_filter.xml). 23 | Feel free to send pull requests to add new supported wifi adapters hardware IDs. 24 | 25 | Now support saving a dvr of the video feed to `Files/Internal Storage/Movies/` 26 | 27 | ## Compatibility 28 | - arm64-v8a, armeabi-v7a android devices (including Meta Quest 2/3, non vr mode) 29 | 30 | ## Build 31 | ``` 32 | git clone https://github.com/OpenIPC/PixelPilot.git 33 | cd PixelPilot 34 | git submodule init 35 | git submodule update 36 | ``` 37 | 38 | The project can then be opened in android studio and built from there. 39 | 40 | ## Installation 41 | - Download and install PixelPilot.apk from https://github.com/OpenIPC/PixelPilot/releases 42 | - Audio feature: Now PixelPilot app had ability to play opus stream from majestic on camera. In order to enable this feature, pls enable on camera side: 43 | + Audio settings in (/etc/majestic.yaml): 44 | ``` 45 | audio: 46 | enabled: true 47 | volume: 30 48 | srate: 8000 49 | codec: opus 50 | outputEnabled: false 51 | outputVolume: 30 52 | ``` 53 | ## List of potential improvements: 54 | * adaptive link [x] 55 | * 40 MHz bandwidth [?] - works but buggy 56 | * support stream over ipv6 57 | * Save audio stream with the video for recordings 58 | * Possibility to forward undecoded wfb stream over the network 59 | 60 | ## Known issues: 61 | * Audio stream is not working 62 | 63 | ## Tested devices based on real user reviews 64 | 65 | * Samsung Galaxy A54 (Exynos 1380 processor) 66 | * Google Pixel 7 Pro 67 | * Poco x6 Pro 68 | * Meta Quest 2 69 | * Meta Quest 3 70 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.androidApplication) 3 | } 4 | 5 | android { 6 | namespace = "com.openipc.pixelpilot" 7 | compileSdk = 34 8 | 9 | defaultConfig { 10 | applicationId = "com.openipc.pixelpilot" 11 | minSdk = 26 12 | targetSdk = 34 13 | versionCode = 1 14 | versionName = "0.20" 15 | } 16 | 17 | signingConfigs { 18 | create("release") { 19 | storeFile = file("../fpv.jks") 20 | storePassword = "release" 21 | keyAlias = "fpv" 22 | keyPassword = "release" 23 | } 24 | } 25 | 26 | buildTypes { 27 | release { 28 | minifyEnabled = true 29 | shrinkResources = true 30 | signingConfig = signingConfigs.release 31 | } 32 | } 33 | 34 | compileOptions { 35 | sourceCompatibility = JavaVersion.VERSION_17 36 | targetCompatibility = JavaVersion.VERSION_17 37 | } 38 | 39 | buildFeatures { 40 | viewBinding = true 41 | } 42 | buildToolsVersion '35.0.0' 43 | ndkVersion '26.1.10909125' 44 | } 45 | 46 | dependencies { 47 | implementation(project(":app:mavlink")) 48 | implementation(project(":app:videonative")) 49 | implementation(project(":app:wfbngrtl8812")) 50 | 51 | implementation(libs.appcompat) 52 | implementation(libs.material) 53 | implementation(libs.philjay.mpandroidchart) 54 | } 55 | -------------------------------------------------------------------------------- /app/mavlink/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /app/mavlink/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.androidLibrary) 3 | } 4 | 5 | android { 6 | namespace = "com.openipc.mavlink" 7 | compileSdk = 34 8 | 9 | defaultConfig { 10 | minSdk = 26 11 | } 12 | 13 | buildTypes { 14 | release { 15 | ndk { 16 | abiFilters.add("arm64-v8a") 17 | abiFilters.add("armeabi-v7a") 18 | } 19 | } 20 | debug { 21 | ndk { 22 | abiFilters.add("arm64-v8a") 23 | abiFilters.add("armeabi-v7a") 24 | } 25 | } 26 | } 27 | 28 | externalNativeBuild { 29 | cmake { 30 | path("src/main/cpp/CMakeLists.txt") 31 | version = "3.22.1" 32 | } 33 | } 34 | 35 | compileOptions { 36 | sourceCompatibility = JavaVersion.VERSION_17 37 | targetCompatibility = JavaVersion.VERSION_17 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /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) 38 | 39 | target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE -Wno-address-of-packed-member) 40 | -------------------------------------------------------------------------------- /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 | /*Accumulate one byte of data into the CRC*/ 37 | uint8_t tmp; 38 | 39 | tmp = data ^ (uint8_t) (*crcAccum & 0xff); 40 | tmp ^= (tmp << 4); 41 | *crcAccum = (*crcAccum >> 8) ^ (tmp << 8) ^ (tmp << 3) ^ (tmp >> 4); 42 | } 43 | #endif 44 | 45 | 46 | /** 47 | * @brief Initiliaze the buffer for the X.25 CRC 48 | * 49 | * @param crcAccum the 16 bit X.25 CRC 50 | */ 51 | static inline void crc_init(uint16_t *crcAccum) { 52 | *crcAccum = X25_INIT_CRC; 53 | } 54 | 55 | 56 | /** 57 | * @brief Calculates the X.25 checksum on a byte buffer 58 | * 59 | * @param pBuffer buffer containing the byte array to hash 60 | * @param length length of the byte array 61 | * @return the checksum over the buffer bytes 62 | **/ 63 | static inline uint16_t crc_calculate(const uint8_t *pBuffer, uint16_t length) { 64 | uint16_t crcTmp; 65 | crc_init(&crcTmp); 66 | while (length--) { 67 | crc_accumulate(*pBuffer++, &crcTmp); 68 | } 69 | return crcTmp; 70 | } 71 | 72 | 73 | /** 74 | * @brief Accumulate the X.25 CRC by adding an array of bytes 75 | * 76 | * The checksum function adds the hash of one char at a time to the 77 | * 16 bit checksum (uint16_t). 78 | * 79 | * @param data new bytes to hash 80 | * @param crcAccum the already accumulated checksum 81 | **/ 82 | static inline void crc_accumulate_buffer(uint16_t *crcAccum, const char *pBuffer, uint16_t length) { 83 | const uint8_t *p = (const uint8_t *) pBuffer; 84 | while (length--) { 85 | crc_accumulate(*p++, crcAccum); 86 | } 87 | } 88 | 89 | #if defined(MAVLINK_USE_CXX_NAMESPACE) || defined(__cplusplus) 90 | } 91 | #endif 92 | -------------------------------------------------------------------------------- /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 | ICAROUS_TRACK_BAND_TYPE_NONE = 0, /* | */ 42 | ICAROUS_TRACK_BAND_TYPE_NEAR = 1, /* | */ 43 | ICAROUS_TRACK_BAND_TYPE_RECOVERY = 2, /* | */ 44 | ICAROUS_TRACK_BAND_TYPES_ENUM_END = 3, /* | */ 45 | } ICAROUS_TRACK_BAND_TYPES; 46 | #endif 47 | 48 | /** @brief */ 49 | #ifndef HAVE_ENUM_ICAROUS_FMS_STATE 50 | #define HAVE_ENUM_ICAROUS_FMS_STATE 51 | typedef enum ICAROUS_FMS_STATE { 52 | ICAROUS_FMS_STATE_IDLE = 0, /* | */ 53 | ICAROUS_FMS_STATE_TAKEOFF = 1, /* | */ 54 | ICAROUS_FMS_STATE_CLIMB = 2, /* | */ 55 | ICAROUS_FMS_STATE_CRUISE = 3, /* | */ 56 | ICAROUS_FMS_STATE_APPROACH = 4, /* | */ 57 | ICAROUS_FMS_STATE_LAND = 5, /* | */ 58 | ICAROUS_FMS_STATE_ENUM_END = 6, /* | */ 59 | } ICAROUS_FMS_STATE; 60 | #endif 61 | 62 | // MAVLINK VERSION 63 | 64 | #ifndef MAVLINK_VERSION 65 | #define MAVLINK_VERSION 2 66 | #endif 67 | 68 | #if (MAVLINK_VERSION == 0) 69 | #undef MAVLINK_VERSION 70 | #define MAVLINK_VERSION 2 71 | #endif 72 | 73 | // MESSAGE DEFINITIONS 74 | #include "./mavlink_msg_icarous_heartbeat.h" 75 | #include "./mavlink_msg_icarous_kinematic_bands.h" 76 | 77 | // base include 78 | 79 | 80 | #undef MAVLINK_THIS_XML_IDX 81 | #define MAVLINK_THIS_XML_IDX 3 82 | 83 | #if MAVLINK_THIS_XML_IDX == MAVLINK_PRIMARY_XML_IDX 84 | # define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_ICAROUS_HEARTBEAT, MAVLINK_MESSAGE_INFO_ICAROUS_KINEMATIC_BANDS} 85 | # define MAVLINK_MESSAGE_NAMES {{ "ICAROUS_HEARTBEAT", 42000 }, { "ICAROUS_KINEMATIC_BANDS", 42001 }} 86 | # if MAVLINK_COMMAND_24BIT 87 | # include "../mavlink_get_info.h" 88 | # endif 89 | #endif 90 | 91 | #ifdef __cplusplus 92 | } 93 | #endif // __cplusplus 94 | #endif // MAVLINK_ICAROUS_H 95 | -------------------------------------------------------------------------------- /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/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 | mavlink_test_common(system_id, component_id, last_msg); 20 | mavlink_test_standard(system_id, component_id, last_msg); 21 | } 22 | #endif 23 | 24 | #include "../common/testsuite.h" 25 | 26 | 27 | static void 28 | mavlink_test_standard(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg) { 29 | 30 | } 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif // __cplusplus 35 | #endif // STANDARD_TESTSUITE_H 36 | -------------------------------------------------------------------------------- /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/openipc/mavlink/MavlinkData.java: -------------------------------------------------------------------------------- 1 | package com.openipc.mavlink; 2 | 3 | public class MavlinkData { 4 | public final float telemetryAltitude; 5 | public final float telemetryPitch; 6 | public final float telemetryRoll; 7 | public final float telemetryYaw; 8 | public final float telemetryBattery; 9 | public final float telemetryCurrent; 10 | public final float telemetryCurrentConsumed; 11 | public final double telemetryLat; 12 | public final double telemetryLon; 13 | public final double telemetryLatBase; 14 | public final double telemetryLonBase; 15 | public final double telemetryHdg; 16 | public final double telemetryDistance; 17 | public final float telemetrySat; 18 | public final float telemetryGSpeed; 19 | public final float telemetryVSpeed; 20 | public final float telemetryThrottle; 21 | public final byte telemetryArm; 22 | public final byte flight_mode; 23 | public final byte gps_fix_type; 24 | public final byte hdop; 25 | public final byte rssi; 26 | public final byte heading; 27 | public String status_text; 28 | 29 | public MavlinkData(float telemetryAltitude, float telemetryPitch, float telemetryRoll, float telemetryYaw, 30 | float telemetryBattery, float telemetryCurrent, float telemetryCurrentConsumed, 31 | double telemetryLat, double telemetryLon, double telemetryLatBase, double telemetryLonBase, 32 | double telemetryHdg, double telemetryDistance, float telemetrySat, float telemetryGSpeed, 33 | float telemetryVSpeed, float telemetryThrottle, byte telemetryArm, byte flight_mode, 34 | byte gps_fix_type, byte hdop, byte rssi, byte heading, String status) { 35 | this.telemetryAltitude = telemetryAltitude; 36 | this.telemetryPitch = telemetryPitch; 37 | this.telemetryRoll = telemetryRoll; 38 | this.telemetryYaw = telemetryYaw; 39 | this.telemetryBattery = telemetryBattery; 40 | this.telemetryCurrent = telemetryCurrent; 41 | this.telemetryCurrentConsumed = telemetryCurrentConsumed; 42 | this.telemetryLat = telemetryLat; 43 | this.telemetryLon = telemetryLon; 44 | this.telemetryLatBase = telemetryLatBase; 45 | this.telemetryLonBase = telemetryLonBase; 46 | this.telemetryHdg = telemetryHdg; 47 | this.telemetryDistance = telemetryDistance; 48 | this.telemetrySat = telemetrySat; 49 | this.telemetryGSpeed = telemetryGSpeed; 50 | this.telemetryVSpeed = telemetryVSpeed; 51 | this.telemetryThrottle = telemetryThrottle; 52 | this.telemetryArm = telemetryArm; 53 | this.flight_mode = flight_mode; 54 | this.gps_fix_type = gps_fix_type; 55 | this.hdop = hdop; 56 | this.rssi = rssi; 57 | this.heading = heading; 58 | this.status_text = status; 59 | } 60 | } -------------------------------------------------------------------------------- /app/mavlink/src/main/java/com/openipc/mavlink/MavlinkNative.java: -------------------------------------------------------------------------------- 1 | package com.openipc.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 | 14 | public static native void nativeStop(Context context); 15 | 16 | // TODO: Use message queue from cpp for performance# 17 | // This initiates a 'call back' for the IVideoParams 18 | public static native void nativeCallBack(T t); 19 | } -------------------------------------------------------------------------------- /app/mavlink/src/main/java/com/openipc/mavlink/MavlinkUpdate.java: -------------------------------------------------------------------------------- 1 | package com.openipc.mavlink; 2 | 3 | public interface MavlinkUpdate { 4 | void onNewMavlinkData(final MavlinkData data); 5 | } -------------------------------------------------------------------------------- /app/src/main/assets/gs.key: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/assets/gs.key -------------------------------------------------------------------------------- /app/src/main/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/ic_launcher-playstore.png -------------------------------------------------------------------------------- /app/src/main/java/com/openipc/pixelpilot/SettingsChanged.java: -------------------------------------------------------------------------------- 1 | package com.openipc.pixelpilot; 2 | 3 | public interface SettingsChanged { 4 | void onChannelSettingChanged(final int channel); 5 | void onBandwidthSettingChanged(final int bw); 6 | } 7 | -------------------------------------------------------------------------------- /app/src/main/java/com/openipc/pixelpilot/UsbDeviceFilter.java: -------------------------------------------------------------------------------- 1 | package com.openipc.pixelpilot; 2 | 3 | import android.content.Context; 4 | import android.content.res.XmlResourceParser; 5 | 6 | import org.xmlpull.v1.XmlPullParserException; 7 | 8 | import java.io.IOException; 9 | import java.util.ArrayList; 10 | import java.util.List; 11 | 12 | public class UsbDeviceFilter { 13 | public int vendorId; 14 | public int productId; 15 | 16 | public UsbDeviceFilter(int vid, int pid) { 17 | vendorId = vid; 18 | productId = pid; 19 | } 20 | 21 | public static List parseXml(Context context, int resourceId) 22 | throws XmlPullParserException, IOException { 23 | List devices = new ArrayList<>(); 24 | XmlResourceParser parser = context.getResources().getXml(resourceId); 25 | 26 | int eventType = parser.getEventType(); 27 | while (eventType != XmlResourceParser.END_DOCUMENT) { 28 | if (eventType == XmlResourceParser.START_TAG) { 29 | String tag = parser.getName(); 30 | if (tag.equals("usb-device")) { 31 | String vendorIdString = parser.getAttributeValue(null, "vendor-id"); 32 | String productIdString = parser.getAttributeValue(null, "product-id"); 33 | 34 | int vendorId = Integer.parseInt(vendorIdString, 16); 35 | int productId = Integer.parseInt(productIdString, 16); 36 | 37 | UsbDeviceFilter device = new UsbDeviceFilter(vendorId, productId); 38 | devices.add(device); 39 | } 40 | } 41 | eventType = parser.next(); 42 | } 43 | return devices; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/java/com/openipc/pixelpilot/osd/OSDElement.java: -------------------------------------------------------------------------------- 1 | package com.openipc.pixelpilot.osd; 2 | 3 | public class OSDElement { 4 | public String name; 5 | public MovableLayout layout; 6 | 7 | public OSDElement(String n, MovableLayout l) { 8 | name = n; 9 | layout = l; 10 | } 11 | 12 | public String prefName() { 13 | return String.format("%d", name.hashCode()); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/air_speed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/drawable/air_speed.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/alt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/drawable/alt.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/amp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/drawable/amp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/armed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/drawable/armed.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_battery_0_bar_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_battery_1_bar_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_battery_2_bar_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_battery_3_bar_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_battery_4_bar_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_battery_5_bar_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_battery_6_bar_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_battery_charging_full_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_battery_full_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_fiber_manual_record_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_import_export_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_personal_video_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/baseline_settings_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/battery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/drawable/battery.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/celsius.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/drawable/celsius.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/drawable/circle.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/compass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/drawable/compass.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/cross_hair.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/drawable/cross_hair.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/dis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/drawable/dis.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/disarmed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/drawable/disarmed.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/fahrenheit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/drawable/fahrenheit.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/gnd_speed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/drawable/gnd_speed.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/drawable/home.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/home_dist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/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/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/drawable/kmh.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/lat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/drawable/lat.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/drawable/link.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/lon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/drawable/lon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/drawable/ms.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/navigation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/drawable/navigation.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/navigation_rev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/drawable/navigation_rev.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/pitch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/drawable/pitch.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/record.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/drawable/record.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/recording.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/drawable/recording.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/roll.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/drawable/roll.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/rssi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/drawable/rssi.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/sat1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/drawable/sat1.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/sat2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/drawable/sat2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/timer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/drawable/timer.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/wnd_speed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/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/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/mipmap-anydpi/icon.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/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 | PixelPilot 3 | 4 | 1 5 | 2 6 | 3 7 | 4 8 | 5 9 | 6 10 | 7 11 | 8 12 | 9 13 | 10 14 | 11 15 | 12 16 | 13 17 | 32 18 | 36 19 | 40 20 | 44 21 | 48 22 | 52 23 | 56 24 | 60 25 | 64 26 | 68 27 | 96 28 | 100 29 | 104 30 | 108 31 | 112 32 | 116 33 | 120 34 | 124 35 | 128 36 | 132 37 | 136 38 | 140 39 | 144 40 | 149 41 | 153 42 | 157 43 | 161 44 | 165 45 | 169 46 | 173 47 | 177 48 | 49 | 50 | 20 51 | 40 52 | 53 | 54 | -------------------------------------------------------------------------------- /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/file_paths.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/xml/usb_device_filter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 9 | 12 | 15 | 18 | 21 | 24 | 27 | 30 | 33 | 36 | 37 | -------------------------------------------------------------------------------- /app/videonative/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /app/videonative/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.androidLibrary) 3 | } 4 | 5 | android { 6 | namespace = "com.openipc.videonative" 7 | compileSdk = 34 8 | 9 | defaultConfig { 10 | minSdk = 26 11 | } 12 | 13 | buildTypes { 14 | release { 15 | ndk { 16 | abiFilters.add("arm64-v8a") 17 | abiFilters.add("armeabi-v7a") 18 | } 19 | } 20 | debug { 21 | ndk { 22 | abiFilters.add("arm64-v8a") 23 | abiFilters.add("armeabi-v7a") 24 | } 25 | } 26 | } 27 | 28 | externalNativeBuild { 29 | cmake { 30 | path("src/main/cpp/CMakeLists.txt") 31 | version = "3.22.1" 32 | } 33 | } 34 | 35 | compileOptions { 36 | sourceCompatibility = JavaVersion.VERSION_17 37 | targetCompatibility = JavaVersion.VERSION_17 38 | } 39 | } 40 | 41 | dependencies { 42 | implementation(libs.appcompat) 43 | implementation(libs.material) 44 | } 45 | -------------------------------------------------------------------------------- /app/videonative/src/main/cpp/.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: Google 2 | IndentWidth: 4 3 | TabWidth: 4 4 | UseTab: Never 5 | AlignAfterOpenBracket: AlwaysBreak 6 | BreakBeforeBraces: Custom 7 | BraceWrapping: 8 | BeforeElse: true 9 | AfterFunction: true 10 | AfterEnum: true 11 | AfterControlStatement: Always 12 | AfterClass: true 13 | AfterCaseLabel: true 14 | AfterNamespace: true 15 | AfterObjCDeclaration: true 16 | AfterStruct: true 17 | AfterUnion: true 18 | AfterExternBlock: true 19 | BeforeCatch: true 20 | BeforeLambdaBody: true 21 | BeforeWhile: true 22 | IndentBraces: false 23 | SplitEmptyFunction: true 24 | SplitEmptyRecord: false 25 | SplitEmptyNamespace: true 26 | AllowShortFunctionsOnASingleLine: Inline 27 | ColumnLimit: 120 28 | NamespaceIndentation: None 29 | AccessModifierOffset: -2 30 | AlignConsecutiveAssignments: true 31 | AlignConsecutiveDeclarations: true 32 | AlignOperands: true 33 | AlignTrailingComments: true 34 | BinPackArguments: false 35 | BinPackParameters: false 36 | PointerAlignment: Left 37 | DerivePointerAlignment: false 38 | SpaceBeforeParens: ControlStatements 39 | SpaceAfterCStyleCast: true 40 | SpacesInAngles: false 41 | SpacesInParentheses: false 42 | SpacesInSquareBrackets: false 43 | SortIncludes: true 44 | IncludeBlocks: Preserve 45 | IndentCaseLabels: true 46 | -------------------------------------------------------------------------------- /app/videonative/src/main/cpp/AudioDecoder.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by BangDC on 28/09/2024. 3 | // 4 | 5 | #ifndef PIXELPILOT_AUDIODECODER_H 6 | #define PIXELPILOT_AUDIODECODER_H 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include "libs/include/opus.h" 14 | 15 | typedef struct _AudioUDPPacket 16 | { 17 | _AudioUDPPacket(const uint8_t* _data, size_t _len) 18 | { 19 | memcpy(data, _data, _len); 20 | len = _len; 21 | }; 22 | uint8_t data[250]; 23 | size_t len; 24 | } AudioUDPPacket; 25 | 26 | class AudioDecoder 27 | { 28 | public: 29 | AudioDecoder(); 30 | ~AudioDecoder(); 31 | 32 | // Audio buffer 33 | void initAudio(); 34 | void enqueueAudio(const uint8_t* data, const std::size_t data_length); 35 | void startAudioProcessing() 36 | { 37 | stopAudioFlag = false; 38 | m_audioThread = std::thread(&AudioDecoder::processAudioQueue, this); 39 | } 40 | 41 | void stopAudioProcessing() 42 | { 43 | { 44 | std::lock_guard lock(m_mtxQueue); 45 | stopAudioFlag = true; 46 | } 47 | m_cvQueue.notify_all(); 48 | if (m_audioThread.joinable()) 49 | { 50 | m_audioThread.join(); 51 | } 52 | } 53 | void processAudioQueue(); 54 | void stopAudio(); 55 | bool isInit = false; 56 | 57 | private: 58 | void onNewAudioData(const uint8_t* data, const std::size_t data_length); 59 | 60 | private: 61 | const int BUFFER_CAPACITY_IN_FRAMES = 4096; 62 | std::queue m_audioQueue; 63 | std::mutex m_mtxQueue; 64 | std::condition_variable m_cvQueue; 65 | bool stopAudioFlag = false; 66 | std::thread m_audioThread; 67 | AAudioStreamBuilder* m_builder = nullptr; 68 | AAudioStream* m_stream = nullptr; 69 | OpusDecoder* pOpusDecoder = nullptr; 70 | }; 71 | #endif // PIXELPILOT_AUDIODECODER_H 72 | -------------------------------------------------------------------------------- /app/videonative/src/main/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | cmake_minimum_required(VERSION 3.6) 3 | 4 | project("VideoNative") 5 | 6 | include_directories(libs/include) 7 | 8 | add_library(${CMAKE_PROJECT_NAME} SHARED 9 | parser/H26XParser.cpp 10 | parser/ParseRTP.cpp 11 | AudioDecoder.cpp 12 | UdpReceiver.cpp 13 | UdsReceiver.cpp 14 | VideoDecoder.cpp 15 | VideoPlayer.cpp) 16 | 17 | 18 | target_link_libraries(${CMAKE_PROJECT_NAME} 19 | # List libraries link to the target library 20 | android 21 | mediandk 22 | aaudio 23 | ${CMAKE_SOURCE_DIR}/libs/${ANDROID_ABI}/libopus.so 24 | log) 25 | 26 | set_property(TARGET ${CMAKE_PROJECT_NAME} PROPERTY CXX_STANDARD 20) 27 | 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 9 | #include 10 | #include "../helper/AndroidLogger.hpp" 11 | #include "NALU.hpp" 12 | 13 | // Takes a continuous stream of NALUs and save SPS / PPS data 14 | // For later use 15 | class KeyFrameFinder 16 | { 17 | private: 18 | std::unique_ptr SPS = nullptr; 19 | std::unique_ptr PPS = nullptr; 20 | // VPS are only used in H265 21 | std::unique_ptr VPS = nullptr; 22 | 23 | public: 24 | bool saveIfKeyFrame(const NALU& nalu) 25 | { 26 | if (nalu.getSize() <= 0) return false; 27 | if (nalu.isSPS()) 28 | { 29 | SPS = std::make_unique(nalu); 30 | // MLOGD<<"SPS found"; 31 | // MLOGD<(nalu); 37 | // MLOGD<<"PPS found"; 38 | return true; 39 | } 40 | else if (nalu.IS_H265_PACKET && nalu.isVPS()) 41 | { 42 | VPS = std::make_unique(nalu); 43 | // MLOGD<<"VPS found"; 44 | return true; 45 | } 46 | // qDebug()<<"not a keyframe"<<(int)nalu.getDataWithoutPrefix()[0]; 47 | return false; 48 | } 49 | 50 | // H264 needs sps and pps 51 | // H265 needs sps,pps and vps 52 | bool allKeyFramesAvailable(const bool IS_H265 = false) 53 | { 54 | if (IS_H265) 55 | { 56 | return SPS != nullptr && PPS != nullptr && VPS != nullptr; 57 | } 58 | return SPS != nullptr && PPS != nullptr; 59 | } 60 | 61 | // SPS 62 | const NALU& getCSD0() const 63 | { 64 | assert(SPS); 65 | return SPS->get_nal(); 66 | } 67 | 68 | const NALU& getCSD1() const 69 | { 70 | assert(PPS); 71 | return PPS->get_nal(); 72 | } 73 | 74 | const NALU& getVPS() const 75 | { 76 | assert(VPS); 77 | return VPS->get_nal(); 78 | } 79 | 80 | static void appendNaluData(std::vector& buff, const NALU& nalu) 81 | { 82 | buff.insert(buff.begin(), nalu.getData(), nalu.getData() + nalu.getSize()); 83 | } 84 | 85 | void reset() 86 | { 87 | SPS = nullptr; 88 | PPS = nullptr; 89 | VPS = nullptr; 90 | } 91 | }; 92 | 93 | #endif // FPVUE_KEYFRAMEFINDER_HPP 94 | -------------------------------------------------------------------------------- /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 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | // Starts a new thread that continuously checks for new data on UDP port 17 | 18 | class UDPReceiver 19 | { 20 | public: 21 | typedef std::function DATA_CALLBACK; 22 | typedef std::function SOURCE_IP_CALLBACK; 23 | 24 | public: 25 | /** 26 | * @param javaVm used to set thread priority (attach and then detach) for android, 27 | nullptr when priority doesn't matter/not using android 28 | * @param port : The port to listen on 29 | * @param CPUPriority: The priority the receiver thread will run with if javaVm!=nullptr 30 | * @param onDataReceivedCallback: called every time new data is received 31 | * @param WANTED_RCVBUF_SIZE: The buffer allocated by the OS might not be sufficient to buffer incoming data when 32 | receiving at a high data rate 33 | * If @param WANTED_RCVBUF_SIZE is bigger than the size allocated by the OS a bigger buffer is requested, but it is 34 | not 35 | * guaranteed that the size is actually increased. Use 0 to leave the buffer size untouched 36 | */ 37 | UDPReceiver( 38 | JavaVM* javaVm, 39 | int port, 40 | std::string name, 41 | int CPUPriority, 42 | DATA_CALLBACK onDataReceivedCallback, 43 | size_t WANTED_RCVBUF_SIZE = 0); 44 | 45 | /** 46 | * Register a callback that is called once and contains the IP address of the first received packet's sender 47 | */ 48 | void registerOnSourceIPFound(SOURCE_IP_CALLBACK onSourceIP1); 49 | 50 | /** 51 | * Start receiver thread,which opens UDP port 52 | */ 53 | void startReceiving(); 54 | 55 | /** 56 | * Stop and join receiver thread, which closes port 57 | */ 58 | void stopReceiving(); 59 | 60 | // Get function(s) for private member variables 61 | long getNReceivedBytes() const; 62 | 63 | std::string getSourceIPAddress() const; 64 | 65 | int getPort() const; 66 | 67 | private: 68 | void receiveFromUDPLoop(); 69 | 70 | const DATA_CALLBACK onDataReceivedCallback = nullptr; 71 | SOURCE_IP_CALLBACK onSourceIP = nullptr; 72 | const int mPort; 73 | const int mCPUPriority; 74 | // Hmm.... 75 | const size_t WANTED_RCVBUF_SIZE; 76 | const std::string mName; 77 | /// We need this reference to stop the receiving thread 78 | int mSocket = 0; 79 | std::string senderIP = "0.0.0.0"; 80 | std::atomic receiving = false; 81 | std::atomic nReceivedBytes = 0; 82 | std::unique_ptr mUDPReceiverThread; 83 | // https://en.wikipedia.org/wiki/User_Datagram_Protocol 84 | // 65,507 bytes (65,535 − 8 byte UDP header − 20 byte IP header). 85 | static constexpr const size_t UDP_PACKET_MAX_SIZE = 65507; 86 | JavaVM* javaVm; 87 | }; 88 | 89 | #endif // FPVUE_UDPRECEIVER_H 90 | -------------------------------------------------------------------------------- /app/videonative/src/main/cpp/UdsReceiver.h: -------------------------------------------------------------------------------- 1 | // 2 | // UDSReceiver.h 3 | // Unix‑Domain Datagram receiver running in its own thread 4 | // Drop‑in companion to the existing UDPReceiver 5 | // 6 | // Created: 2025‑04‑18 7 | // 8 | 9 | #pragma once 10 | 11 | #include // JavaVM 12 | #include 13 | #include 14 | #include 15 | 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | class UDSReceiver 24 | { 25 | public: 26 | using DATA_CALLBACK = std::function; 27 | using SOURCE_CALLBACK = std::function; 28 | 29 | UDSReceiver( 30 | JavaVM* javaVm, 31 | std::string socketPath, // e.g. "/data/local/tmp/my_socket" 32 | std::string name, // thread name 33 | int CPUPriority, // Android thread prio (ignored on desktop) 34 | DATA_CALLBACK onData, 35 | size_t wantedRcvbufSize = 256 * 1024); 36 | 37 | // non‑copyable / movable 38 | UDSReceiver(const UDSReceiver&) = delete; 39 | UDSReceiver& operator=(const UDSReceiver&) = delete; 40 | UDSReceiver(UDSReceiver&&) = delete; 41 | UDSReceiver& operator=(UDSReceiver&&) = delete; 42 | 43 | ~UDSReceiver() { stopReceiving(); } 44 | 45 | // control 46 | void startReceiving(); 47 | void stopReceiving(); 48 | 49 | // callbacks 50 | void registerOnSourceFound(SOURCE_CALLBACK cb) { onSource = std::move(cb); } 51 | 52 | // stats / info 53 | [[nodiscard]] long getNReceivedBytes() const { return nReceivedBytes; } 54 | [[nodiscard]] std::string getSourcePath() const { return senderPath; } 55 | 56 | private: 57 | void receiveLoop(); 58 | 59 | // ctor constants 60 | const std::string mSocketPath; 61 | const std::string mName; 62 | const size_t WANTED_RCVBUF_SIZE; 63 | const int mCPUPriority; 64 | const DATA_CALLBACK onData; 65 | JavaVM* const javaVm; 66 | 67 | // runtime 68 | int mSocket = -1; 69 | std::unique_ptr mThread; 70 | std::atomic receiving{false}; 71 | std::atomic nReceivedBytes{0}; 72 | std::string senderPath; 73 | SOURCE_CALLBACK onSource; 74 | }; 75 | -------------------------------------------------------------------------------- /app/videonative/src/main/cpp/helper/AndroidMediaFormatHelper.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef FPVUE_ANDROIDMEDIAFORMATHELPER_H 3 | #define FPVUE_ANDROIDMEDIAFORMATHELPER_H 4 | 5 | #include 6 | #include "../NALU/KeyFrameFinder.hpp" 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 | { 13 | // I think: KEY_LOW_LATENCY is for decoder. But it doesn't really make a difference anyways 14 | static const auto PARAMETER_KEY_LOW_LATENCY = "low-latency"; 15 | AMediaFormat_setInt32(format, PARAMETER_KEY_LOW_LATENCY, 1); 16 | // Lower values mean higher priority 17 | // Works on pixel 3 (look at output format description) 18 | static const auto AMEDIAFORMAT_KEY_PRIORITY = "priority"; 19 | AMediaFormat_setInt32(format, AMEDIAFORMAT_KEY_PRIORITY, 0); 20 | // set operating rate ? - doesn't make a difference 21 | // static const auto AMEDIAFORMAT_KEY_OPERATING_RATE="operating-rate"; 22 | // AMediaFormat_setInt32(format,AMEDIAFORMAT_KEY_OPERATING_RATE,60); 23 | // 24 | // AMEDIAFORMAT_KEY_LOW_LATENCY; 25 | // AMEDIAFORMAT_KEY_LATENCY; 26 | // AMediaFormat_setInt32(format,AMEDIAFORMAT_KEY_LATENCY,0); 27 | // AMediaFormat_setInt32(format,AMEDIAFORMAT_KEY_OPERATING_RATE,0); 28 | } 29 | 30 | static void h264_configureAMediaFormat(KeyFrameFinder& kff, AMediaFormat* format) 31 | { 32 | const auto sps = kff.getCSD0(); 33 | const auto pps = kff.getCSD1(); 34 | const auto videoWH = sps.getVideoWidthHeightSPS(); 35 | AMediaFormat_setInt32(format, AMEDIAFORMAT_KEY_WIDTH, videoWH[0]); 36 | AMediaFormat_setInt32(format, AMEDIAFORMAT_KEY_HEIGHT, videoWH[1]); 37 | AMediaFormat_setBuffer(format, "csd-0", sps.getData(), (size_t) sps.getSize()); 38 | AMediaFormat_setBuffer(format, "csd-1", pps.getData(), (size_t) pps.getSize()); 39 | MLOGD << "Video WH:" << videoWH[0] << " H:" << videoWH[1]; 40 | // AMediaFormat_setInt32(format,AMEDIAFORMAT_KEY_BIT_RATE,5*1024*1024); 41 | // AMediaFormat_setInt32(format,AMEDIAFORMAT_KEY_FRAME_RATE,60); 42 | // AVCProfileBaseline==1 43 | // AMediaFormat_setInt32(decoder.format,AMEDIAFORMAT_KEY_PROFILE,1); 44 | // AMediaFormat_setInt32(decoder.format,AMEDIAFORMAT_KEY_PRIORITY,0); 45 | // writeAndroidPerformanceParams(format); 46 | } 47 | 48 | static void h265_configureAMediaFormat(KeyFrameFinder& kff, AMediaFormat* format) 49 | { 50 | std::vector buff = {}; 51 | const auto sps = kff.getCSD0(); 52 | const auto pps = kff.getCSD1(); 53 | const auto vps = kff.getVPS(); 54 | buff.reserve(sps.getSize() + pps.getSize() + vps.getSize()); 55 | KeyFrameFinder::appendNaluData(buff, vps); 56 | KeyFrameFinder::appendNaluData(buff, sps); 57 | KeyFrameFinder::appendNaluData(buff, pps); 58 | const auto videoWH = sps.getVideoWidthHeightSPS(); 59 | AMediaFormat_setInt32(format, AMEDIAFORMAT_KEY_WIDTH, videoWH[0]); 60 | AMediaFormat_setInt32(format, AMEDIAFORMAT_KEY_HEIGHT, videoWH[1]); 61 | AMediaFormat_setBuffer(format, "csd-0", buff.data(), buff.size()); 62 | MLOGD << "Video WH:" << videoWH[0] << " H:" << videoWH[1]; 63 | // writeAndroidPerformanceParams(format); 64 | } 65 | 66 | #endif // FPVUE_ANDROIDMEDIAFORMATHELPER_H 67 | -------------------------------------------------------------------------------- /app/videonative/src/main/cpp/libs/arm64-v8a/libopus.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/videonative/src/main/cpp/libs/arm64-v8a/libopus.so -------------------------------------------------------------------------------- /app/videonative/src/main/cpp/libs/arm64-v8a/libopusenc.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/videonative/src/main/cpp/libs/arm64-v8a/libopusenc.so -------------------------------------------------------------------------------- /app/videonative/src/main/cpp/libs/armeabi-v7a/libopus.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/videonative/src/main/cpp/libs/armeabi-v7a/libopus.so -------------------------------------------------------------------------------- /app/videonative/src/main/cpp/libs/armeabi-v7a/libopusenc.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/videonative/src/main/cpp/libs/armeabi-v7a/libopusenc.so -------------------------------------------------------------------------------- /app/videonative/src/main/cpp/parser/H26XParser.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Constantin on 24.01.2018. 3 | // 4 | #include "H26XParser.h" 5 | #include 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( 14 | &H26XParser::onNewNaluDataExtracted, 15 | this, 16 | std::placeholders::_1, 17 | std::placeholders::_2, 18 | std::placeholders::_3)) 19 | { 20 | } 21 | 22 | void H26XParser::reset() 23 | { 24 | mDecodeRTP.reset(); 25 | nParsedNALUs = 0; 26 | nParsedKonfigurationFrames = 0; 27 | } 28 | 29 | void H26XParser::parse_rtp_stream(const uint8_t* rtp_data, const size_t data_length) 30 | { 31 | const RTP::RTPPacket rtpPacket(rtp_data, data_length); 32 | if (rtpPacket.header.payload == RTP_PAYLOAD_TYPE_H264) 33 | { 34 | IS_H265 = false; 35 | mDecodeRTP.parseRTPH264toNALU(rtp_data, data_length); 36 | } 37 | else if (rtpPacket.header.payload == RTP_PAYLOAD_TYPE_H265) 38 | { 39 | IS_H265 = true; 40 | mDecodeRTP.parseRTPH265toNALU(rtp_data, data_length); 41 | } 42 | } 43 | 44 | void H26XParser::onNewNaluDataExtracted( 45 | const std::chrono::steady_clock::time_point creation_time, const uint8_t* nalu_data, const int nalu_data_size) 46 | { 47 | NALU nalu(nalu_data, nalu_data_size, IS_H265, creation_time); 48 | newNaluExtracted(nalu); 49 | } 50 | 51 | void H26XParser::newNaluExtracted(const NALU& nalu) 52 | { 53 | if (onNewNALU != nullptr) 54 | { 55 | onNewNALU(nalu); 56 | } 57 | nParsedNALUs++; 58 | const bool sps_or_pps = nalu.isSPS() || nalu.isPPS(); 59 | if (sps_or_pps) 60 | { 61 | nParsedKonfigurationFrames++; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /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 26 | #include 27 | 28 | class H26XParser 29 | { 30 | public: 31 | H26XParser(NALU_DATA_CALLBACK onNewNALU); 32 | 33 | void parse_rtp_stream(const uint8_t* rtp_data, const size_t data_len); 34 | 35 | void reset(); 36 | 37 | public: 38 | long nParsedNALUs = 0; 39 | long nParsedKonfigurationFrames = 0; 40 | 41 | // For live video set to -1 (no fps limitation), else additional latency will be generated 42 | void setLimitFPS(int maxFPS); 43 | 44 | private: 45 | void newNaluExtracted(const NALU& nalu); 46 | 47 | void onNewNaluDataExtracted( 48 | const std::chrono::steady_clock::time_point creation_time, const uint8_t* nalu_data, const int nalu_data_size); 49 | 50 | const NALU_DATA_CALLBACK onNewNALU; 51 | std::chrono::steady_clock::time_point lastFrameLimitFPS = std::chrono::steady_clock::now(); 52 | std::chrono::steady_clock::time_point lastTimeOnNewNALUCalled = std::chrono::steady_clock::now(); 53 | 54 | RTPDecoder mDecodeRTP; 55 | 56 | int maxFPS = 0; 57 | bool IS_H265 = false; 58 | // First time a NALU was succesfully decoded 59 | // std::chrono::steady_clock::time_point timeFirstNALUArrived=std::chrono::steady_clock::time_point(0); 60 | }; 61 | 62 | #endif // FPV_VR_PARSE2H264RAW_H 63 | -------------------------------------------------------------------------------- /app/videonative/src/main/cpp/scripts/format.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Find the repository root directory. 4 | REPO_ROOT=$(git rev-parse --show-toplevel) 5 | 6 | # Apply clang-format to all .cpp, .c, .h, and .hpp files within $REPO_ROOT/app/videonative/src/main/cpp, 7 | # excluding the $REPO_ROOT/app/videonative/src/main/cpp/libs/include directory. 8 | 9 | find "$REPO_ROOT/app/videonative/src/main/cpp" \ 10 | -path "$REPO_ROOT/app/videonative/src/main/cpp/libs/include" -prune -o \ 11 | \( -type f \( -name '*.cpp' -o -name '*.c' -o -name '*.h' -o -name '*.hpp' \) -exec clang-format -i {} \; \) 12 | -------------------------------------------------------------------------------- /app/videonative/src/main/cpp/tests/BufferedPacketQueue_test.cpp: -------------------------------------------------------------------------------- 1 | #include "BufferedPacketQueue.h" // the class under test 2 | #include 3 | #include 4 | #include 5 | 6 | // ---------- Test fixture ---------------------------------------------------- 7 | class BufferedPacketQueueTest : public ::testing::Test 8 | { 9 | protected: 10 | BufferedPacketQueue q; 11 | std::vector delivered; 12 | 13 | void SetUp() override { delivered.clear(); } 14 | 15 | /* Helper: feed one packet and record what the queue actually delivers. */ 16 | void feed(uint16_t seq) 17 | { 18 | uint16_t dummy = seq; 19 | 20 | auto cb = [this](const uint8_t* seq, std::size_t) 21 | { 22 | std::cout << "Delivered packet with sequence: " << *(uint16_t*) seq << std::endl; 23 | delivered.push_back(*(uint16_t*) seq); 24 | }; 25 | 26 | q.processPacket(seq, (uint8_t*) &dummy, 2, cb); 27 | } 28 | }; 29 | 30 | // ---------- The reproduction test ------------------------------------------ 31 | TEST_F(BufferedPacketQueueTest, WrapAroundDelivers) 32 | { 33 | feed(65534); 34 | feed(65535); 35 | ASSERT_EQ(delivered, (std::vector{65534, 65535})); 36 | 37 | for (uint16_t s = 0; s < 25; ++s) feed(s); 38 | 39 | std::vector expected = {65534, 65535}; 40 | for (uint16_t s = 0; s < 25; ++s) expected.push_back(s); 41 | 42 | ASSERT_EQ(delivered, expected) << "Overflow flush should deliver the entire block in one shot"; 43 | } 44 | 45 | TEST_F(BufferedPacketQueueTest, ReorderedDeliversInOrder) 46 | { 47 | feed(65533); 48 | feed(65535); 49 | feed(65534); 50 | ASSERT_EQ(delivered, (std::vector{65533, 65534, 65535})); 51 | 52 | for (uint16_t s = 0; s < 25; ++s) feed(s); 53 | 54 | std::vector expected = {65533, 65534, 65535}; 55 | for (uint16_t s = 0; s < 25; ++s) expected.push_back(s); 56 | 57 | ASSERT_EQ(delivered, expected) << "Overflow flush should deliver the entire block in one shot"; 58 | } 59 | 60 | // ---------- gtest boilerplate main ----------------------------------------- 61 | int main(int argc, char** argv) 62 | { 63 | ::testing::InitGoogleTest(&argc, argv); 64 | return RUN_ALL_TESTS(); 65 | } 66 | -------------------------------------------------------------------------------- /app/videonative/src/main/cpp/tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # CMakeLists.txt — build + run the unit test 2 | # 3 | # Requires CMake ≥ 3.14 (for FetchContent) and a C++17 toolchain. 4 | 5 | cmake_minimum_required(VERSION 3.14) 6 | project(BufferedPacketQueueTests LANGUAGES CXX) 7 | 8 | # ---------- Toolchain basics ------------------------------------------------- 9 | set(CMAKE_CXX_STANDARD 17) 10 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 11 | set(CMAKE_CXX_EXTENSIONS OFF) 12 | 13 | # ---------- GoogleTest (fetched at configure time) --------------------------- 14 | include(FetchContent) 15 | 16 | FetchContent_Declare( 17 | googletest 18 | URL https://github.com/google/googletest/archive/refs/tags/v1.14.0.zip 19 | ) 20 | # Keep GoogleTest from messing with CRT flags on MSVC 21 | set(gtest_force_shared_crt OFF CACHE BOOL "" FORCE) 22 | FetchContent_MakeAvailable(googletest) 23 | 24 | enable_testing() 25 | 26 | # ---------- Test executable -------------------------------------------------- 27 | add_executable(queue_test 28 | BufferedPacketqueue_test.cpp 29 | ) 30 | 31 | target_include_directories(queue_test PUBLIC 32 | ${CMAKE_CURRENT_SOURCE_DIR} 33 | ${CMAKE_CURRENT_SOURCE_DIR}/../ 34 | ) 35 | target_link_libraries(queue_test 36 | GTest::gtest_main 37 | ) 38 | 39 | # Discover and register the test with CTest 40 | include(GoogleTest) 41 | gtest_discover_tests(queue_test) 42 | -------------------------------------------------------------------------------- /app/videonative/src/main/cpp/time_util.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by gaeta on 2024-06-20. 3 | // 4 | 5 | #ifndef FPVUE_TIME_UTIL_H 6 | #define FPVUE_TIME_UTIL_H 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | /** 13 | * @return milliseconds 14 | */ 15 | uint64_t get_time_ms() 16 | { 17 | struct timespec spec; 18 | if (clock_gettime(1, &spec) == -1) 19 | { /* 1 is CLOCK_MONOTONIC */ 20 | abort(); 21 | } 22 | return spec.tv_sec * 1000 + spec.tv_nsec / 1e6; 23 | } 24 | 25 | #endif // FPVUE_TIME_UTIL_H 26 | -------------------------------------------------------------------------------- /app/videonative/src/main/java/com/openipc/videonative/ISurfaceTextureAvailable.java: -------------------------------------------------------------------------------- 1 | package com.openipc.videonative; 2 | 3 | import android.graphics.SurfaceTexture; 4 | import android.view.Surface; 5 | 6 | public interface ISurfaceTextureAvailable { 7 | // Called when the SurfaceTexture (and Surface) was created on the OpenGL Thread 8 | // However, the callback is run on the UI Thread to ease synchronization 9 | void surfaceTextureCreated(final SurfaceTexture surfaceTexture, final Surface surface); 10 | 11 | // Called when the SurfaceTexture (and Surface) are about to be deleted. After this call 12 | // returns, both SurfaceTexture and Surface are invalid and must not be used anymore 13 | void surfaceTextureDestroyed(); 14 | } 15 | 16 | -------------------------------------------------------------------------------- /app/videonative/src/main/java/com/openipc/videonative/IVideoParamsChanged.java: -------------------------------------------------------------------------------- 1 | package com.openipc.videonative; 2 | 3 | import androidx.annotation.Keep; 4 | 5 | @Keep 6 | public interface IVideoParamsChanged { 7 | void onVideoRatioChanged(int videoW, int videoH); 8 | 9 | void onDecodingInfoChanged(final DecodingInfo decodingInfo); 10 | } -------------------------------------------------------------------------------- /app/wfbngrtl8812/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /app/wfbngrtl8812/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.androidLibrary) 3 | } 4 | 5 | android { 6 | namespace = "com.openipc.wfbngrtl8812" 7 | compileSdk = 34 8 | 9 | defaultConfig { 10 | minSdk = 26 11 | } 12 | 13 | buildTypes { 14 | release { 15 | ndk { 16 | abiFilters.add("arm64-v8a") 17 | abiFilters.add("armeabi-v7a") 18 | } 19 | } 20 | debug { 21 | ndk { 22 | abiFilters.add("arm64-v8a") 23 | abiFilters.add("armeabi-v7a") 24 | } 25 | } 26 | } 27 | 28 | externalNativeBuild { 29 | cmake { 30 | path("src/main/cpp/CMakeLists.txt") 31 | version = "3.22.1" 32 | } 33 | } 34 | 35 | compileOptions { 36 | sourceCompatibility = JavaVersion.VERSION_17 37 | targetCompatibility = JavaVersion.VERSION_17 38 | } 39 | } 40 | 41 | dependencies { 42 | implementation(libs.appcompat) 43 | implementation(libs.material) 44 | } 45 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/FecChangeController.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | class FecChangeController { 8 | static constexpr const char *TAG = "FecChangeController"; 9 | 10 | public: 11 | /// \brief Query the current (possibly decayed) fec_change value. 12 | /// Call this as often as you like; the class handles its own timing. 13 | int value() { 14 | if (!mEnabled) return 0; 15 | 16 | std::lock_guard lock(mx_); 17 | decayLocked_(); 18 | return val_; 19 | } 20 | 21 | /// \brief Raise fec_change. If newValue <= current, the call is ignored. 22 | /// A successful bump resets the 5-second “hold” timer. 23 | void bump(int newValue) { 24 | std::lock_guard lock(mx_); 25 | if (newValue > val_) { 26 | __android_log_print(ANDROID_LOG_ERROR, TAG, "bumping FEC: %d", newValue); 27 | 28 | val_ = newValue; 29 | lastChange_ = Clock::now(); 30 | } 31 | } 32 | 33 | void setEnabled(bool use) { mEnabled = use; } 34 | 35 | private: 36 | using Clock = std::chrono::steady_clock; 37 | static constexpr std::chrono::seconds kTick{1}; // length of one hold/decay window 38 | 39 | void decayLocked_() { 40 | if (val_ == 0) return; 41 | 42 | auto now = Clock::now(); 43 | auto elapsed = now - lastChange_; 44 | 45 | // Still inside the mandatory 5-second hold? Do nothing. 46 | if (elapsed < kTick) return; 47 | 48 | // How many *full* ticks have passed since lastChange_? 49 | auto ticks = std::chrono::duration_cast(elapsed).count() / kTick.count(); 50 | if (ticks == 0) return; // safety net (shouldn’t hit) 51 | 52 | int decayed = val_ - static_cast(ticks); 53 | if (decayed < 0) decayed = 0; 54 | 55 | // Commit the decay and anchor lastChange_ on the most recent tick boundary 56 | if (decayed != val_) { 57 | val_ = decayed; 58 | lastChange_ += kTick * ticks; 59 | } 60 | } 61 | 62 | int val_{0}; 63 | Clock::time_point lastChange_{Clock::now()}; 64 | std::mutex mx_; 65 | bool mEnabled = false; 66 | }; 67 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/RxFrame.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by gaeta on 2024-03-31. 3 | // 4 | 5 | #include "RxFrame.h" 6 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/SignalQualityCalculator.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | // Adjust as needed 11 | static const char *TAG = "SignalQualityCalculator"; 12 | 13 | class SignalQualityCalculator { 14 | public: 15 | struct SignalQuality { 16 | int lost_last_second; 17 | int recovered_last_second; 18 | int quality; 19 | float snr; 20 | std::string idr_code; 21 | }; 22 | 23 | SignalQualityCalculator() = default; 24 | ~SignalQualityCalculator() = default; 25 | 26 | void add_rssi(uint8_t ant1, uint8_t ant2); 27 | 28 | void add_snr(int8_t ant1, int8_t ant2); 29 | 30 | void add_fec_data(uint32_t p_all, uint32_t p_recovered, uint32_t p_lost); 31 | 32 | template float get_avg(const T &array) { 33 | std::lock_guard lock(m_mutex); 34 | 35 | // Remove old entries 36 | cleanup_old_rssi_data(); 37 | 38 | float sum1 = 0.f; 39 | float sum2 = 0.f; 40 | int count = static_cast(array.size()); 41 | 42 | if (count > 0) { 43 | for (auto &entry : array) { 44 | sum1 += entry.ant1; 45 | sum2 += entry.ant2; 46 | } 47 | sum1 /= count; 48 | sum2 /= count; 49 | } 50 | 51 | // We'll take the maximum of the two average RSSI values 52 | float avg = std::max(sum1, sum2); 53 | return avg; 54 | } 55 | 56 | SignalQuality calculate_signal_quality(); 57 | 58 | static SignalQualityCalculator &get_instance() { 59 | static SignalQualityCalculator instance; 60 | return instance; 61 | } 62 | 63 | private: 64 | std::pair get_accumulated_fec_data(); 65 | 66 | // Helper methods to remove old entries 67 | void cleanup_old_rssi_data(); 68 | void cleanup_old_snr_data(); 69 | void cleanup_old_fec_data(); 70 | 71 | // We store a timestamp for each RSSI entry 72 | struct RssiEntry { 73 | std::chrono::steady_clock::time_point timestamp; 74 | uint8_t ant1; 75 | uint8_t ant2; 76 | }; 77 | 78 | // We store a timestamp for each RSSI entry 79 | struct SnrEntry { 80 | std::chrono::steady_clock::time_point timestamp; 81 | int8_t ant1; 82 | int8_t ant2; 83 | }; 84 | 85 | // We store a timestamp for each FEC entry 86 | struct FecEntry { 87 | std::chrono::steady_clock::time_point timestamp; 88 | uint32_t all; 89 | uint32_t recovered; 90 | uint32_t lost; 91 | }; 92 | 93 | double map_range(double value, double inputMin, double inputMax, double outputMin, double outputMax) { 94 | return outputMin + ((value - inputMin) * (outputMax - outputMin) / (inputMax - inputMin)); 95 | } 96 | 97 | private: 98 | const std::chrono::seconds kAveragingWindow{std::chrono::seconds(1)}; 99 | mutable std::recursive_mutex m_mutex; 100 | 101 | std::vector m_rssis; 102 | 103 | std::vector m_snrs; 104 | 105 | std::vector m_fec_data; 106 | 107 | std::string m_idr_code{"aaaa"}; 108 | }; 109 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/WfbngLink.hpp: -------------------------------------------------------------------------------- 1 | #ifndef FPV_VR_WFBNG_LINK_H 2 | #define FPV_VR_WFBNG_LINK_H 3 | 4 | #include "FecChangeController.h" 5 | #include "SignalQualityCalculator.h" 6 | #include "TxFrame.h" 7 | 8 | extern "C" { 9 | #include "wfb-ng/src/fec.h" 10 | } 11 | 12 | #include "devourer/src/WiFiDriver.h" 13 | #include "wfb-ng/src/rx.hpp" 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | const u8 wfb_tx_port = 160; 20 | const u8 wfb_rx_port = 32; 21 | 22 | class WfbngLink { 23 | public: 24 | WfbngLink(JNIEnv *env, jobject context); 25 | 26 | int run(JNIEnv *env, jobject androidContext, jint wifiChannel, jint bw, jint fd); 27 | 28 | void initAgg(); 29 | 30 | void stop(JNIEnv *env, jobject androidContext, jint fd); 31 | 32 | std::mutex agg_mutex; 33 | std::unique_ptr video_aggregator; 34 | std::unique_ptr mavlink_aggregator; 35 | std::unique_ptr udp_aggregator; 36 | 37 | void start_link_quality_thread(int fd); 38 | 39 | // adaptive link 40 | // TODO: move this to private section 41 | int current_fd; 42 | bool adaptive_link_enabled; 43 | bool adaptive_link_should_stop{false}; 44 | int adaptive_tx_power; 45 | std::map> rtl_devices; 46 | std::unique_ptr link_quality_thread{nullptr}; 47 | bool should_clear_stats{false}; 48 | FecChangeController fec; 49 | 50 | void init_thread(std::unique_ptr &thread, 51 | const std::function()> &init_func) { 52 | std::unique_lock lock(thread_mutex); 53 | destroy_thread(thread); 54 | thread = init_func(); 55 | } 56 | 57 | void destroy_thread(std::unique_ptr &thread) { 58 | std::unique_lock lock(thread_mutex); 59 | if (thread && thread->joinable()) { 60 | thread->join(); 61 | thread = nullptr; 62 | } 63 | } 64 | 65 | void stop_adaptive_link() { 66 | std::unique_lock lock(thread_mutex); 67 | 68 | if (!link_quality_thread) return; 69 | this->adaptive_link_should_stop = true; 70 | destroy_thread(link_quality_thread); 71 | } 72 | 73 | private: 74 | void stopDevice() { 75 | if (rtl_devices.find(current_fd) == rtl_devices.end()) return; 76 | auto dev = rtl_devices.at(current_fd).get(); 77 | if (dev) { 78 | dev->should_stop = true; 79 | } 80 | } 81 | 82 | const char *keyPath = "/data/user/0/com.openipc.pixelpilot/files/gs.key"; 83 | std::recursive_mutex thread_mutex; 84 | std::unique_ptr wifi_driver; 85 | std::shared_ptr txFrame; 86 | uint32_t video_channel_id_be; 87 | uint32_t mavlink_channel_id_be; 88 | uint32_t udp_channel_id_be; 89 | 90 | Logger_t log; 91 | std::unique_ptr usb_event_thread{nullptr}; 92 | std::unique_ptr usb_tx_thread{nullptr}; 93 | uint32_t link_id{7669206}; 94 | SignalQualityCalculator rssi_calculator; 95 | }; 96 | 97 | #endif // FPV_VR_WFBNG_LINK_H 98 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/pcap/bluetooth.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006 Paolo Abeni (Italy) 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * 3. The name of the author may not be used to endorse or promote 15 | * products derived from this software without specific prior written 16 | * permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | * 30 | * bluetooth data struct 31 | * By Paolo Abeni 32 | */ 33 | 34 | #ifndef lib_pcap_bluetooth_h 35 | #define lib_pcap_bluetooth_h 36 | 37 | #include 38 | 39 | /* 40 | * Header prepended libpcap to each bluetooth h4 frame, 41 | * fields are in network byte order 42 | */ 43 | typedef struct _pcap_bluetooth_h4_header { 44 | uint32_t direction; /* if first bit is set direction is incoming */ 45 | } pcap_bluetooth_h4_header; 46 | 47 | /* 48 | * Header prepended libpcap to each bluetooth linux monitor frame, 49 | * fields are in network byte order 50 | */ 51 | typedef struct _pcap_bluetooth_linux_monitor_header { 52 | uint16_t adapter_id; 53 | uint16_t opcode; 54 | } pcap_bluetooth_linux_monitor_header; 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/pcap/ipnet.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 3 | * The Regents of the University of California. All rights reserved. 4 | * 5 | * This code is derived from the Stanford/CMU enet packet filter, 6 | * (net/enet.c) distributed as part of 4.3BSD, and code contributed 7 | * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence 8 | * Berkeley Laboratory. 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions 12 | * are met: 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 2. Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * 3. All advertising materials mentioning features or use of this software 19 | * must display the following acknowledgement: 20 | * This product includes software developed by the University of 21 | * California, Berkeley and its contributors. 22 | * 4. Neither the name of the University nor the names of its contributors 23 | * may be used to endorse or promote products derived from this software 24 | * without specific prior written permission. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 27 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 28 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 29 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 30 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 | * SUCH DAMAGE. 37 | */ 38 | 39 | #define IPH_AF_INET 2 /* Matches Solaris's AF_INET */ 40 | #define IPH_AF_INET6 26 /* Matches Solaris's AF_INET6 */ 41 | 42 | #define IPNET_OUTBOUND 1 43 | #define IPNET_INBOUND 2 44 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/pcap/vlan.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 3 | * The Regents of the University of California. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. All advertising materials mentioning features or use of this software 14 | * must display the following acknowledgement: 15 | * This product includes software developed by the University of 16 | * California, Berkeley and its contributors. 17 | * 4. Neither the name of the University nor the names of its contributors 18 | * may be used to endorse or promote products derived from this software 19 | * without specific prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 | * SUCH DAMAGE. 32 | */ 33 | 34 | #ifndef lib_pcap_vlan_h 35 | #define lib_pcap_vlan_h 36 | 37 | #include 38 | 39 | struct vlan_tag { 40 | uint16_t vlan_tpid; /* ETH_P_8021Q */ 41 | uint16_t vlan_tci; /* VLAN TCI */ 42 | }; 43 | 44 | #define VLAN_TAG_LEN 4 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef sodium_H 3 | #define sodium_H 4 | 5 | #include "sodium/version.h" 6 | 7 | #include "sodium/core.h" 8 | #include "sodium/crypto_aead_aegis128l.h" 9 | #include "sodium/crypto_aead_aegis256.h" 10 | #include "sodium/crypto_aead_aes256gcm.h" 11 | #include "sodium/crypto_aead_chacha20poly1305.h" 12 | #include "sodium/crypto_aead_xchacha20poly1305.h" 13 | #include "sodium/crypto_auth.h" 14 | #include "sodium/crypto_auth_hmacsha256.h" 15 | #include "sodium/crypto_auth_hmacsha512.h" 16 | #include "sodium/crypto_auth_hmacsha512256.h" 17 | #include "sodium/crypto_box.h" 18 | #include "sodium/crypto_box_curve25519xsalsa20poly1305.h" 19 | #include "sodium/crypto_core_hchacha20.h" 20 | #include "sodium/crypto_core_hsalsa20.h" 21 | #include "sodium/crypto_core_salsa20.h" 22 | #include "sodium/crypto_core_salsa2012.h" 23 | #include "sodium/crypto_core_salsa208.h" 24 | #include "sodium/crypto_generichash.h" 25 | #include "sodium/crypto_generichash_blake2b.h" 26 | #include "sodium/crypto_hash.h" 27 | #include "sodium/crypto_hash_sha256.h" 28 | #include "sodium/crypto_hash_sha512.h" 29 | #include "sodium/crypto_kdf.h" 30 | #include "sodium/crypto_kdf_hkdf_sha256.h" 31 | #include "sodium/crypto_kdf_hkdf_sha512.h" 32 | #include "sodium/crypto_kdf_blake2b.h" 33 | #include "sodium/crypto_kdf_hkdf_sha256.h" 34 | #include "sodium/crypto_kdf_hkdf_sha512.h" 35 | #include "sodium/crypto_kx.h" 36 | #include "sodium/crypto_onetimeauth.h" 37 | #include "sodium/crypto_onetimeauth_poly1305.h" 38 | #include "sodium/crypto_pwhash.h" 39 | #include "sodium/crypto_pwhash_argon2i.h" 40 | #include "sodium/crypto_scalarmult.h" 41 | #include "sodium/crypto_scalarmult_curve25519.h" 42 | #include "sodium/crypto_secretbox.h" 43 | #include "sodium/crypto_secretbox_xsalsa20poly1305.h" 44 | #include "sodium/crypto_secretstream_xchacha20poly1305.h" 45 | #include "sodium/crypto_shorthash.h" 46 | #include "sodium/crypto_shorthash_siphash24.h" 47 | #include "sodium/crypto_sign.h" 48 | #include "sodium/crypto_sign_ed25519.h" 49 | #include "sodium/crypto_stream.h" 50 | #include "sodium/crypto_stream_chacha20.h" 51 | #include "sodium/crypto_stream_salsa20.h" 52 | #include "sodium/crypto_stream_xsalsa20.h" 53 | #include "sodium/crypto_verify_16.h" 54 | #include "sodium/crypto_verify_32.h" 55 | #include "sodium/crypto_verify_64.h" 56 | #include "sodium/randombytes.h" 57 | #include "sodium/randombytes_internal_random.h" 58 | #include "sodium/randombytes_sysrandom.h" 59 | #include "sodium/runtime.h" 60 | #include "sodium/utils.h" 61 | 62 | #ifndef SODIUM_LIBRARY_MINIMAL 63 | 64 | #include "sodium/crypto_box_curve25519xchacha20poly1305.h" 65 | #include "sodium/crypto_core_ed25519.h" 66 | #include "sodium/crypto_core_ristretto255.h" 67 | #include "sodium/crypto_pwhash_scryptsalsa208sha256.h" 68 | #include "sodium/crypto_scalarmult_ed25519.h" 69 | #include "sodium/crypto_scalarmult_ristretto255.h" 70 | #include "sodium/crypto_secretbox_xchacha20poly1305.h" 71 | #include "sodium/crypto_stream_salsa2012.h" 72 | #include "sodium/crypto_stream_salsa208.h" 73 | #include "sodium/crypto_stream_xchacha20.h" 74 | 75 | #endif 76 | 77 | #endif 78 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/core.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef sodium_core_H 3 | #define sodium_core_H 4 | 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | SODIUM_EXPORT 12 | int sodium_init(void) 13 | __attribute__ ((warn_unused_result)); 14 | 15 | /* ---- */ 16 | 17 | SODIUM_EXPORT 18 | int sodium_set_misuse_handler(void (*handler)(void)); 19 | 20 | SODIUM_EXPORT 21 | void sodium_misuse(void) 22 | __attribute__ ((noreturn)); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_auth.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_auth_H 2 | #define crypto_auth_H 3 | 4 | #include 5 | 6 | #include "crypto_auth_hmacsha512256.h" 7 | #include "export.h" 8 | 9 | #ifdef __cplusplus 10 | # ifdef __GNUC__ 11 | # pragma GCC diagnostic ignored "-Wlong-long" 12 | # endif 13 | extern "C" { 14 | #endif 15 | 16 | #define crypto_auth_BYTES crypto_auth_hmacsha512256_BYTES 17 | SODIUM_EXPORT 18 | size_t crypto_auth_bytes(void); 19 | 20 | #define crypto_auth_KEYBYTES crypto_auth_hmacsha512256_KEYBYTES 21 | SODIUM_EXPORT 22 | size_t crypto_auth_keybytes(void); 23 | 24 | #define crypto_auth_PRIMITIVE "hmacsha512256" 25 | SODIUM_EXPORT 26 | const char *crypto_auth_primitive(void); 27 | 28 | SODIUM_EXPORT 29 | int crypto_auth(unsigned char *out, const unsigned char *in, 30 | unsigned long long inlen, const unsigned char *k) 31 | __attribute__ ((nonnull(1, 4))); 32 | 33 | SODIUM_EXPORT 34 | int crypto_auth_verify(const unsigned char *h, const unsigned char *in, 35 | unsigned long long inlen, const unsigned char *k) 36 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull(1, 4))); 37 | 38 | SODIUM_EXPORT 39 | void crypto_auth_keygen(unsigned char k[crypto_auth_KEYBYTES]) 40 | __attribute__ ((nonnull)); 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_auth_hmacsha256.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_auth_hmacsha256_H 2 | #define crypto_auth_hmacsha256_H 3 | 4 | #include 5 | #include "crypto_hash_sha256.h" 6 | #include "export.h" 7 | 8 | #ifdef __cplusplus 9 | # ifdef __GNUC__ 10 | # pragma GCC diagnostic ignored "-Wlong-long" 11 | # endif 12 | extern "C" { 13 | #endif 14 | 15 | #define crypto_auth_hmacsha256_BYTES 32U 16 | SODIUM_EXPORT 17 | size_t crypto_auth_hmacsha256_bytes(void); 18 | 19 | #define crypto_auth_hmacsha256_KEYBYTES 32U 20 | SODIUM_EXPORT 21 | size_t crypto_auth_hmacsha256_keybytes(void); 22 | 23 | SODIUM_EXPORT 24 | int crypto_auth_hmacsha256(unsigned char *out, 25 | const unsigned char *in, 26 | unsigned long long inlen, 27 | const unsigned char *k) __attribute__ ((nonnull(1, 4))); 28 | 29 | SODIUM_EXPORT 30 | int crypto_auth_hmacsha256_verify(const unsigned char *h, 31 | const unsigned char *in, 32 | unsigned long long inlen, 33 | const unsigned char *k) 34 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull(1, 4))); 35 | 36 | /* ------------------------------------------------------------------------- */ 37 | 38 | typedef struct crypto_auth_hmacsha256_state { 39 | crypto_hash_sha256_state ictx; 40 | crypto_hash_sha256_state octx; 41 | } crypto_auth_hmacsha256_state; 42 | 43 | SODIUM_EXPORT 44 | size_t crypto_auth_hmacsha256_statebytes(void); 45 | 46 | SODIUM_EXPORT 47 | int crypto_auth_hmacsha256_init(crypto_auth_hmacsha256_state *state, 48 | const unsigned char *key, 49 | size_t keylen) __attribute__ ((nonnull)); 50 | 51 | SODIUM_EXPORT 52 | int crypto_auth_hmacsha256_update(crypto_auth_hmacsha256_state *state, 53 | const unsigned char *in, 54 | unsigned long long inlen) 55 | __attribute__ ((nonnull(1))); 56 | 57 | SODIUM_EXPORT 58 | int crypto_auth_hmacsha256_final(crypto_auth_hmacsha256_state *state, 59 | unsigned char *out) __attribute__ ((nonnull)); 60 | 61 | 62 | SODIUM_EXPORT 63 | void crypto_auth_hmacsha256_keygen(unsigned char k[crypto_auth_hmacsha256_KEYBYTES]) 64 | __attribute__ ((nonnull)); 65 | 66 | #ifdef __cplusplus 67 | } 68 | #endif 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_auth_hmacsha512.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_auth_hmacsha512_H 2 | #define crypto_auth_hmacsha512_H 3 | 4 | #include 5 | #include "crypto_hash_sha512.h" 6 | #include "export.h" 7 | 8 | #ifdef __cplusplus 9 | # ifdef __GNUC__ 10 | # pragma GCC diagnostic ignored "-Wlong-long" 11 | # endif 12 | extern "C" { 13 | #endif 14 | 15 | #define crypto_auth_hmacsha512_BYTES 64U 16 | SODIUM_EXPORT 17 | size_t crypto_auth_hmacsha512_bytes(void); 18 | 19 | #define crypto_auth_hmacsha512_KEYBYTES 32U 20 | SODIUM_EXPORT 21 | size_t crypto_auth_hmacsha512_keybytes(void); 22 | 23 | SODIUM_EXPORT 24 | int crypto_auth_hmacsha512(unsigned char *out, 25 | const unsigned char *in, 26 | unsigned long long inlen, 27 | const unsigned char *k) __attribute__ ((nonnull(1, 4))); 28 | 29 | SODIUM_EXPORT 30 | int crypto_auth_hmacsha512_verify(const unsigned char *h, 31 | const unsigned char *in, 32 | unsigned long long inlen, 33 | const unsigned char *k) 34 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull(1, 4))); 35 | 36 | /* ------------------------------------------------------------------------- */ 37 | 38 | typedef struct crypto_auth_hmacsha512_state { 39 | crypto_hash_sha512_state ictx; 40 | crypto_hash_sha512_state octx; 41 | } crypto_auth_hmacsha512_state; 42 | 43 | SODIUM_EXPORT 44 | size_t crypto_auth_hmacsha512_statebytes(void); 45 | 46 | SODIUM_EXPORT 47 | int crypto_auth_hmacsha512_init(crypto_auth_hmacsha512_state *state, 48 | const unsigned char *key, 49 | size_t keylen) __attribute__ ((nonnull)); 50 | 51 | SODIUM_EXPORT 52 | int crypto_auth_hmacsha512_update(crypto_auth_hmacsha512_state *state, 53 | const unsigned char *in, 54 | unsigned long long inlen) __attribute__ ((nonnull(1))); 55 | 56 | SODIUM_EXPORT 57 | int crypto_auth_hmacsha512_final(crypto_auth_hmacsha512_state *state, 58 | unsigned char *out) __attribute__ ((nonnull)); 59 | 60 | SODIUM_EXPORT 61 | void crypto_auth_hmacsha512_keygen(unsigned char k[crypto_auth_hmacsha512_KEYBYTES]) 62 | __attribute__ ((nonnull)); 63 | 64 | #ifdef __cplusplus 65 | } 66 | #endif 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_auth_hmacsha512256.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_auth_hmacsha512256_H 2 | #define crypto_auth_hmacsha512256_H 3 | 4 | #include 5 | #include "crypto_auth_hmacsha512.h" 6 | #include "export.h" 7 | 8 | #ifdef __cplusplus 9 | # ifdef __GNUC__ 10 | # pragma GCC diagnostic ignored "-Wlong-long" 11 | # endif 12 | extern "C" { 13 | #endif 14 | 15 | #define crypto_auth_hmacsha512256_BYTES 32U 16 | SODIUM_EXPORT 17 | size_t crypto_auth_hmacsha512256_bytes(void); 18 | 19 | #define crypto_auth_hmacsha512256_KEYBYTES 32U 20 | SODIUM_EXPORT 21 | size_t crypto_auth_hmacsha512256_keybytes(void); 22 | 23 | SODIUM_EXPORT 24 | int crypto_auth_hmacsha512256(unsigned char *out, 25 | const unsigned char *in, 26 | unsigned long long inlen, 27 | const unsigned char *k) __attribute__ ((nonnull(1, 4))); 28 | 29 | SODIUM_EXPORT 30 | int crypto_auth_hmacsha512256_verify(const unsigned char *h, 31 | const unsigned char *in, 32 | unsigned long long inlen, 33 | const unsigned char *k) 34 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull(1, 4))); 35 | 36 | /* ------------------------------------------------------------------------- */ 37 | 38 | typedef crypto_auth_hmacsha512_state crypto_auth_hmacsha512256_state; 39 | 40 | SODIUM_EXPORT 41 | size_t crypto_auth_hmacsha512256_statebytes(void); 42 | 43 | SODIUM_EXPORT 44 | int crypto_auth_hmacsha512256_init(crypto_auth_hmacsha512256_state *state, 45 | const unsigned char *key, 46 | size_t keylen) __attribute__ ((nonnull)); 47 | 48 | SODIUM_EXPORT 49 | int crypto_auth_hmacsha512256_update(crypto_auth_hmacsha512256_state *state, 50 | const unsigned char *in, 51 | unsigned long long inlen) __attribute__ ((nonnull(1))); 52 | 53 | SODIUM_EXPORT 54 | int crypto_auth_hmacsha512256_final(crypto_auth_hmacsha512256_state *state, 55 | unsigned char *out) __attribute__ ((nonnull)); 56 | 57 | SODIUM_EXPORT 58 | void crypto_auth_hmacsha512256_keygen(unsigned char k[crypto_auth_hmacsha512256_KEYBYTES]) 59 | __attribute__ ((nonnull)); 60 | 61 | #ifdef __cplusplus 62 | } 63 | #endif 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_core_ed25519.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_core_ed25519_H 2 | #define crypto_core_ed25519_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_core_ed25519_BYTES 32 12 | SODIUM_EXPORT 13 | size_t crypto_core_ed25519_bytes(void); 14 | 15 | #define crypto_core_ed25519_UNIFORMBYTES 32 16 | SODIUM_EXPORT 17 | size_t crypto_core_ed25519_uniformbytes(void); 18 | 19 | #define crypto_core_ed25519_HASHBYTES 64 20 | SODIUM_EXPORT 21 | size_t crypto_core_ed25519_hashbytes(void); 22 | 23 | #define crypto_core_ed25519_SCALARBYTES 32 24 | SODIUM_EXPORT 25 | size_t crypto_core_ed25519_scalarbytes(void); 26 | 27 | #define crypto_core_ed25519_NONREDUCEDSCALARBYTES 64 28 | SODIUM_EXPORT 29 | size_t crypto_core_ed25519_nonreducedscalarbytes(void); 30 | 31 | SODIUM_EXPORT 32 | int crypto_core_ed25519_is_valid_point(const unsigned char *p) 33 | __attribute__ ((nonnull)); 34 | 35 | SODIUM_EXPORT 36 | int crypto_core_ed25519_add(unsigned char *r, 37 | const unsigned char *p, const unsigned char *q) 38 | __attribute__ ((nonnull)); 39 | 40 | SODIUM_EXPORT 41 | int crypto_core_ed25519_sub(unsigned char *r, 42 | const unsigned char *p, const unsigned char *q) 43 | __attribute__ ((nonnull)); 44 | 45 | SODIUM_EXPORT 46 | int crypto_core_ed25519_from_uniform(unsigned char *p, const unsigned char *r) 47 | __attribute__ ((nonnull)); 48 | 49 | SODIUM_EXPORT 50 | int crypto_core_ed25519_from_hash(unsigned char *p, const unsigned char *h) 51 | __attribute__ ((nonnull)) __attribute__ ((deprecated)); 52 | 53 | SODIUM_EXPORT 54 | void crypto_core_ed25519_random(unsigned char *p) 55 | __attribute__ ((nonnull)); 56 | 57 | SODIUM_EXPORT 58 | void crypto_core_ed25519_scalar_random(unsigned char *r) 59 | __attribute__ ((nonnull)); 60 | 61 | SODIUM_EXPORT 62 | int crypto_core_ed25519_scalar_invert(unsigned char *recip, const unsigned char *s) 63 | __attribute__ ((nonnull)); 64 | 65 | SODIUM_EXPORT 66 | void crypto_core_ed25519_scalar_negate(unsigned char *neg, const unsigned char *s) 67 | __attribute__ ((nonnull)); 68 | 69 | SODIUM_EXPORT 70 | void crypto_core_ed25519_scalar_complement(unsigned char *comp, const unsigned char *s) 71 | __attribute__ ((nonnull)); 72 | 73 | SODIUM_EXPORT 74 | void crypto_core_ed25519_scalar_add(unsigned char *z, const unsigned char *x, 75 | const unsigned char *y) 76 | __attribute__ ((nonnull)); 77 | 78 | SODIUM_EXPORT 79 | void crypto_core_ed25519_scalar_sub(unsigned char *z, const unsigned char *x, 80 | const unsigned char *y) 81 | __attribute__ ((nonnull)); 82 | 83 | SODIUM_EXPORT 84 | void crypto_core_ed25519_scalar_mul(unsigned char *z, const unsigned char *x, 85 | const unsigned char *y) 86 | __attribute__ ((nonnull)); 87 | 88 | /* 89 | * The interval `s` is sampled from should be at least 317 bits to ensure almost 90 | * uniformity of `r` over `L`. 91 | */ 92 | SODIUM_EXPORT 93 | void crypto_core_ed25519_scalar_reduce(unsigned char *r, const unsigned char *s) 94 | __attribute__ ((nonnull)); 95 | 96 | #ifdef __cplusplus 97 | } 98 | #endif 99 | 100 | #endif 101 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_core_hchacha20.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_core_hchacha20_H 2 | #define crypto_core_hchacha20_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_core_hchacha20_OUTPUTBYTES 32U 12 | SODIUM_EXPORT 13 | size_t crypto_core_hchacha20_outputbytes(void); 14 | 15 | #define crypto_core_hchacha20_INPUTBYTES 16U 16 | SODIUM_EXPORT 17 | size_t crypto_core_hchacha20_inputbytes(void); 18 | 19 | #define crypto_core_hchacha20_KEYBYTES 32U 20 | SODIUM_EXPORT 21 | size_t crypto_core_hchacha20_keybytes(void); 22 | 23 | #define crypto_core_hchacha20_CONSTBYTES 16U 24 | SODIUM_EXPORT 25 | size_t crypto_core_hchacha20_constbytes(void); 26 | 27 | SODIUM_EXPORT 28 | int crypto_core_hchacha20(unsigned char *out, const unsigned char *in, 29 | const unsigned char *k, const unsigned char *c) 30 | __attribute__ ((nonnull(1, 2, 3))); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_core_hsalsa20.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_core_hsalsa20_H 2 | #define crypto_core_hsalsa20_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_core_hsalsa20_OUTPUTBYTES 32U 12 | SODIUM_EXPORT 13 | size_t crypto_core_hsalsa20_outputbytes(void); 14 | 15 | #define crypto_core_hsalsa20_INPUTBYTES 16U 16 | SODIUM_EXPORT 17 | size_t crypto_core_hsalsa20_inputbytes(void); 18 | 19 | #define crypto_core_hsalsa20_KEYBYTES 32U 20 | SODIUM_EXPORT 21 | size_t crypto_core_hsalsa20_keybytes(void); 22 | 23 | #define crypto_core_hsalsa20_CONSTBYTES 16U 24 | SODIUM_EXPORT 25 | size_t crypto_core_hsalsa20_constbytes(void); 26 | 27 | SODIUM_EXPORT 28 | int crypto_core_hsalsa20(unsigned char *out, const unsigned char *in, 29 | const unsigned char *k, const unsigned char *c) 30 | __attribute__ ((nonnull(1, 2, 3))); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_core_salsa20.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_core_salsa20_H 2 | #define crypto_core_salsa20_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_core_salsa20_OUTPUTBYTES 64U 12 | SODIUM_EXPORT 13 | size_t crypto_core_salsa20_outputbytes(void); 14 | 15 | #define crypto_core_salsa20_INPUTBYTES 16U 16 | SODIUM_EXPORT 17 | size_t crypto_core_salsa20_inputbytes(void); 18 | 19 | #define crypto_core_salsa20_KEYBYTES 32U 20 | SODIUM_EXPORT 21 | size_t crypto_core_salsa20_keybytes(void); 22 | 23 | #define crypto_core_salsa20_CONSTBYTES 16U 24 | SODIUM_EXPORT 25 | size_t crypto_core_salsa20_constbytes(void); 26 | 27 | SODIUM_EXPORT 28 | int crypto_core_salsa20(unsigned char *out, const unsigned char *in, 29 | const unsigned char *k, const unsigned char *c) 30 | __attribute__ ((nonnull(1, 2, 3))); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_core_salsa2012.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_core_salsa2012_H 2 | #define crypto_core_salsa2012_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_core_salsa2012_OUTPUTBYTES 64U 12 | SODIUM_EXPORT 13 | size_t crypto_core_salsa2012_outputbytes(void); 14 | 15 | #define crypto_core_salsa2012_INPUTBYTES 16U 16 | SODIUM_EXPORT 17 | size_t crypto_core_salsa2012_inputbytes(void); 18 | 19 | #define crypto_core_salsa2012_KEYBYTES 32U 20 | SODIUM_EXPORT 21 | size_t crypto_core_salsa2012_keybytes(void); 22 | 23 | #define crypto_core_salsa2012_CONSTBYTES 16U 24 | SODIUM_EXPORT 25 | size_t crypto_core_salsa2012_constbytes(void); 26 | 27 | SODIUM_EXPORT 28 | int crypto_core_salsa2012(unsigned char *out, const unsigned char *in, 29 | const unsigned char *k, const unsigned char *c) 30 | __attribute__ ((nonnull(1, 2, 3))); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_core_salsa208.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_core_salsa208_H 2 | #define crypto_core_salsa208_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_core_salsa208_OUTPUTBYTES 64U 12 | SODIUM_EXPORT 13 | size_t crypto_core_salsa208_outputbytes(void) 14 | __attribute__ ((deprecated)); 15 | 16 | #define crypto_core_salsa208_INPUTBYTES 16U 17 | SODIUM_EXPORT 18 | size_t crypto_core_salsa208_inputbytes(void) 19 | __attribute__ ((deprecated)); 20 | 21 | #define crypto_core_salsa208_KEYBYTES 32U 22 | SODIUM_EXPORT 23 | size_t crypto_core_salsa208_keybytes(void) 24 | __attribute__ ((deprecated)); 25 | 26 | #define crypto_core_salsa208_CONSTBYTES 16U 27 | SODIUM_EXPORT 28 | size_t crypto_core_salsa208_constbytes(void) 29 | __attribute__ ((deprecated)); 30 | 31 | SODIUM_EXPORT 32 | int crypto_core_salsa208(unsigned char *out, const unsigned char *in, 33 | const unsigned char *k, const unsigned char *c) 34 | __attribute__ ((nonnull(1, 2, 3))); 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_generichash.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_generichash_H 2 | #define crypto_generichash_H 3 | 4 | #include 5 | 6 | #include "crypto_generichash_blake2b.h" 7 | #include "export.h" 8 | 9 | #ifdef __cplusplus 10 | # ifdef __GNUC__ 11 | # pragma GCC diagnostic ignored "-Wlong-long" 12 | # endif 13 | extern "C" { 14 | #endif 15 | 16 | #define crypto_generichash_BYTES_MIN crypto_generichash_blake2b_BYTES_MIN 17 | SODIUM_EXPORT 18 | size_t crypto_generichash_bytes_min(void); 19 | 20 | #define crypto_generichash_BYTES_MAX crypto_generichash_blake2b_BYTES_MAX 21 | SODIUM_EXPORT 22 | size_t crypto_generichash_bytes_max(void); 23 | 24 | #define crypto_generichash_BYTES crypto_generichash_blake2b_BYTES 25 | SODIUM_EXPORT 26 | size_t crypto_generichash_bytes(void); 27 | 28 | #define crypto_generichash_KEYBYTES_MIN crypto_generichash_blake2b_KEYBYTES_MIN 29 | SODIUM_EXPORT 30 | size_t crypto_generichash_keybytes_min(void); 31 | 32 | #define crypto_generichash_KEYBYTES_MAX crypto_generichash_blake2b_KEYBYTES_MAX 33 | SODIUM_EXPORT 34 | size_t crypto_generichash_keybytes_max(void); 35 | 36 | #define crypto_generichash_KEYBYTES crypto_generichash_blake2b_KEYBYTES 37 | SODIUM_EXPORT 38 | size_t crypto_generichash_keybytes(void); 39 | 40 | #define crypto_generichash_PRIMITIVE "blake2b" 41 | SODIUM_EXPORT 42 | const char *crypto_generichash_primitive(void); 43 | 44 | /* 45 | * Important when writing bindings for other programming languages: 46 | * the state address should be 64-bytes aligned. 47 | */ 48 | typedef crypto_generichash_blake2b_state crypto_generichash_state; 49 | 50 | SODIUM_EXPORT 51 | size_t crypto_generichash_statebytes(void); 52 | 53 | SODIUM_EXPORT 54 | int crypto_generichash(unsigned char *out, size_t outlen, 55 | const unsigned char *in, unsigned long long inlen, 56 | const unsigned char *key, size_t keylen) 57 | __attribute__ ((nonnull(1))); 58 | 59 | SODIUM_EXPORT 60 | int crypto_generichash_init(crypto_generichash_state *state, 61 | const unsigned char *key, 62 | const size_t keylen, const size_t outlen) 63 | __attribute__ ((nonnull(1))); 64 | 65 | SODIUM_EXPORT 66 | int crypto_generichash_update(crypto_generichash_state *state, 67 | const unsigned char *in, 68 | unsigned long long inlen) 69 | __attribute__ ((nonnull(1))); 70 | 71 | SODIUM_EXPORT 72 | int crypto_generichash_final(crypto_generichash_state *state, 73 | unsigned char *out, const size_t outlen) 74 | __attribute__ ((nonnull)); 75 | 76 | SODIUM_EXPORT 77 | void crypto_generichash_keygen(unsigned char k[crypto_generichash_KEYBYTES]) 78 | __attribute__ ((nonnull)); 79 | 80 | #ifdef __cplusplus 81 | } 82 | #endif 83 | 84 | #endif 85 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_hash.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_hash_H 2 | #define crypto_hash_H 3 | 4 | /* 5 | * WARNING: Unless you absolutely need to use SHA512 for interoperability, 6 | * purposes, you might want to consider crypto_generichash() instead. 7 | * Unlike SHA512, crypto_generichash() is not vulnerable to length 8 | * extension attacks. 9 | */ 10 | 11 | #include 12 | 13 | #include "crypto_hash_sha512.h" 14 | #include "export.h" 15 | 16 | #ifdef __cplusplus 17 | # ifdef __GNUC__ 18 | # pragma GCC diagnostic ignored "-Wlong-long" 19 | # endif 20 | extern "C" { 21 | #endif 22 | 23 | #define crypto_hash_BYTES crypto_hash_sha512_BYTES 24 | SODIUM_EXPORT 25 | size_t crypto_hash_bytes(void); 26 | 27 | SODIUM_EXPORT 28 | int crypto_hash(unsigned char *out, const unsigned char *in, 29 | unsigned long long inlen) __attribute__ ((nonnull(1))); 30 | 31 | #define crypto_hash_PRIMITIVE "sha512" 32 | SODIUM_EXPORT 33 | const char *crypto_hash_primitive(void) 34 | __attribute__ ((warn_unused_result)); 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_hash_sha256.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_hash_sha256_H 2 | #define crypto_hash_sha256_H 3 | 4 | /* 5 | * WARNING: Unless you absolutely need to use SHA256 for interoperability, 6 | * purposes, you might want to consider crypto_generichash() instead. 7 | * Unlike SHA256, crypto_generichash() is not vulnerable to length 8 | * extension attacks. 9 | */ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | #include "export.h" 16 | 17 | #ifdef __cplusplus 18 | # ifdef __GNUC__ 19 | # pragma GCC diagnostic ignored "-Wlong-long" 20 | # endif 21 | extern "C" { 22 | #endif 23 | 24 | typedef struct crypto_hash_sha256_state { 25 | uint32_t state[8]; 26 | uint64_t count; 27 | uint8_t buf[64]; 28 | } crypto_hash_sha256_state; 29 | 30 | SODIUM_EXPORT 31 | size_t crypto_hash_sha256_statebytes(void); 32 | 33 | #define crypto_hash_sha256_BYTES 32U 34 | SODIUM_EXPORT 35 | size_t crypto_hash_sha256_bytes(void); 36 | 37 | SODIUM_EXPORT 38 | int crypto_hash_sha256(unsigned char *out, const unsigned char *in, 39 | unsigned long long inlen) __attribute__ ((nonnull(1))); 40 | 41 | SODIUM_EXPORT 42 | int crypto_hash_sha256_init(crypto_hash_sha256_state *state) 43 | __attribute__ ((nonnull)); 44 | 45 | SODIUM_EXPORT 46 | int crypto_hash_sha256_update(crypto_hash_sha256_state *state, 47 | const unsigned char *in, 48 | unsigned long long inlen) 49 | __attribute__ ((nonnull(1))); 50 | 51 | SODIUM_EXPORT 52 | int crypto_hash_sha256_final(crypto_hash_sha256_state *state, 53 | unsigned char *out) 54 | __attribute__ ((nonnull)); 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_hash_sha512.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_hash_sha512_H 2 | #define crypto_hash_sha512_H 3 | 4 | /* 5 | * WARNING: Unless you absolutely need to use SHA512 for interoperability, 6 | * purposes, you might want to consider crypto_generichash() instead. 7 | * Unlike SHA512, crypto_generichash() is not vulnerable to length 8 | * extension attacks. 9 | */ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | #include "export.h" 16 | 17 | #ifdef __cplusplus 18 | # ifdef __GNUC__ 19 | # pragma GCC diagnostic ignored "-Wlong-long" 20 | # endif 21 | extern "C" { 22 | #endif 23 | 24 | typedef struct crypto_hash_sha512_state { 25 | uint64_t state[8]; 26 | uint64_t count[2]; 27 | uint8_t buf[128]; 28 | } crypto_hash_sha512_state; 29 | 30 | SODIUM_EXPORT 31 | size_t crypto_hash_sha512_statebytes(void); 32 | 33 | #define crypto_hash_sha512_BYTES 64U 34 | SODIUM_EXPORT 35 | size_t crypto_hash_sha512_bytes(void); 36 | 37 | SODIUM_EXPORT 38 | int crypto_hash_sha512(unsigned char *out, const unsigned char *in, 39 | unsigned long long inlen) __attribute__ ((nonnull(1))); 40 | 41 | SODIUM_EXPORT 42 | int crypto_hash_sha512_init(crypto_hash_sha512_state *state) 43 | __attribute__ ((nonnull)); 44 | 45 | SODIUM_EXPORT 46 | int crypto_hash_sha512_update(crypto_hash_sha512_state *state, 47 | const unsigned char *in, 48 | unsigned long long inlen) 49 | __attribute__ ((nonnull(1))); 50 | 51 | SODIUM_EXPORT 52 | int crypto_hash_sha512_final(crypto_hash_sha512_state *state, 53 | unsigned char *out) 54 | __attribute__ ((nonnull)); 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_kdf.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_kdf_H 2 | #define crypto_kdf_H 3 | 4 | #include 5 | #include 6 | 7 | #include "crypto_kdf_blake2b.h" 8 | #include "export.h" 9 | 10 | #ifdef __cplusplus 11 | # ifdef __GNUC__ 12 | # pragma GCC diagnostic ignored "-Wlong-long" 13 | # endif 14 | extern "C" { 15 | #endif 16 | 17 | #define crypto_kdf_BYTES_MIN crypto_kdf_blake2b_BYTES_MIN 18 | SODIUM_EXPORT 19 | size_t crypto_kdf_bytes_min(void); 20 | 21 | #define crypto_kdf_BYTES_MAX crypto_kdf_blake2b_BYTES_MAX 22 | SODIUM_EXPORT 23 | size_t crypto_kdf_bytes_max(void); 24 | 25 | #define crypto_kdf_CONTEXTBYTES crypto_kdf_blake2b_CONTEXTBYTES 26 | SODIUM_EXPORT 27 | size_t crypto_kdf_contextbytes(void); 28 | 29 | #define crypto_kdf_KEYBYTES crypto_kdf_blake2b_KEYBYTES 30 | SODIUM_EXPORT 31 | size_t crypto_kdf_keybytes(void); 32 | 33 | #define crypto_kdf_PRIMITIVE "blake2b" 34 | SODIUM_EXPORT 35 | const char *crypto_kdf_primitive(void) 36 | __attribute__ ((warn_unused_result)); 37 | 38 | SODIUM_EXPORT 39 | int crypto_kdf_derive_from_key(unsigned char *subkey, size_t subkey_len, 40 | uint64_t subkey_id, 41 | const char ctx[crypto_kdf_CONTEXTBYTES], 42 | const unsigned char key[crypto_kdf_KEYBYTES]) 43 | __attribute__ ((nonnull)); 44 | 45 | SODIUM_EXPORT 46 | void crypto_kdf_keygen(unsigned char k[crypto_kdf_KEYBYTES]) 47 | __attribute__ ((nonnull)); 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_kdf_blake2b.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_kdf_blake2b_H 2 | #define crypto_kdf_blake2b_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include "export.h" 9 | 10 | #ifdef __cplusplus 11 | # ifdef __GNUC__ 12 | # pragma GCC diagnostic ignored "-Wlong-long" 13 | # endif 14 | extern "C" { 15 | #endif 16 | 17 | #define crypto_kdf_blake2b_BYTES_MIN 16 18 | SODIUM_EXPORT 19 | size_t crypto_kdf_blake2b_bytes_min(void); 20 | 21 | #define crypto_kdf_blake2b_BYTES_MAX 64 22 | SODIUM_EXPORT 23 | size_t crypto_kdf_blake2b_bytes_max(void); 24 | 25 | #define crypto_kdf_blake2b_CONTEXTBYTES 8 26 | SODIUM_EXPORT 27 | size_t crypto_kdf_blake2b_contextbytes(void); 28 | 29 | #define crypto_kdf_blake2b_KEYBYTES 32 30 | SODIUM_EXPORT 31 | size_t crypto_kdf_blake2b_keybytes(void); 32 | 33 | SODIUM_EXPORT 34 | int crypto_kdf_blake2b_derive_from_key(unsigned char *subkey, size_t subkey_len, 35 | uint64_t subkey_id, 36 | const char ctx[crypto_kdf_blake2b_CONTEXTBYTES], 37 | const unsigned char key[crypto_kdf_blake2b_KEYBYTES]) 38 | __attribute__ ((nonnull)); 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_kdf_hkdf_sha256.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_kdf_hkdf_sha256_H 2 | #define crypto_kdf_hkdf_sha256_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include "crypto_kdf.h" 9 | #include "crypto_auth_hmacsha256.h" 10 | #include "export.h" 11 | 12 | #ifdef __cplusplus 13 | # ifdef __GNUC__ 14 | # pragma GCC diagnostic ignored "-Wlong-long" 15 | # endif 16 | extern "C" { 17 | #endif 18 | 19 | #define crypto_kdf_hkdf_sha256_KEYBYTES crypto_auth_hmacsha256_BYTES 20 | SODIUM_EXPORT 21 | size_t crypto_kdf_hkdf_sha256_keybytes(void); 22 | 23 | #define crypto_kdf_hkdf_sha256_BYTES_MIN 0U 24 | SODIUM_EXPORT 25 | size_t crypto_kdf_hkdf_sha256_bytes_min(void); 26 | 27 | #define crypto_kdf_hkdf_sha256_BYTES_MAX (0xff * crypto_auth_hmacsha256_BYTES) 28 | SODIUM_EXPORT 29 | size_t crypto_kdf_hkdf_sha256_bytes_max(void); 30 | 31 | SODIUM_EXPORT 32 | int crypto_kdf_hkdf_sha256_extract(unsigned char prk[crypto_kdf_hkdf_sha256_KEYBYTES], 33 | const unsigned char *salt, size_t salt_len, 34 | const unsigned char *ikm, size_t ikm_len) 35 | __attribute__ ((nonnull(4))); 36 | 37 | SODIUM_EXPORT 38 | void crypto_kdf_hkdf_sha256_keygen(unsigned char prk[crypto_kdf_hkdf_sha256_KEYBYTES]); 39 | 40 | SODIUM_EXPORT 41 | int crypto_kdf_hkdf_sha256_expand(unsigned char *out, size_t out_len, 42 | const char *ctx, size_t ctx_len, 43 | const unsigned char prk[crypto_kdf_hkdf_sha256_KEYBYTES]) 44 | __attribute__ ((nonnull(1))); 45 | 46 | /* ------------------------------------------------------------------------- */ 47 | 48 | typedef struct crypto_kdf_hkdf_sha256_state { 49 | crypto_auth_hmacsha256_state st; 50 | } crypto_kdf_hkdf_sha256_state; 51 | 52 | SODIUM_EXPORT 53 | size_t crypto_kdf_hkdf_sha256_statebytes(void); 54 | 55 | SODIUM_EXPORT 56 | int crypto_kdf_hkdf_sha256_extract_init(crypto_kdf_hkdf_sha256_state *state, 57 | const unsigned char *salt, size_t salt_len) 58 | __attribute__ ((nonnull(1))); 59 | 60 | SODIUM_EXPORT 61 | int crypto_kdf_hkdf_sha256_extract_update(crypto_kdf_hkdf_sha256_state *state, 62 | const unsigned char *ikm, size_t ikm_len) 63 | __attribute__ ((nonnull)); 64 | 65 | SODIUM_EXPORT 66 | int crypto_kdf_hkdf_sha256_extract_final(crypto_kdf_hkdf_sha256_state *state, 67 | unsigned char prk[crypto_kdf_hkdf_sha256_KEYBYTES]) 68 | __attribute__ ((nonnull)); 69 | 70 | #ifdef __cplusplus 71 | } 72 | #endif 73 | 74 | #endif 75 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_kdf_hkdf_sha512.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_kdf_hkdf_sha512_H 2 | #define crypto_kdf_hkdf_sha512_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include "crypto_kdf.h" 9 | #include "crypto_auth_hmacsha512.h" 10 | #include "export.h" 11 | 12 | #ifdef __cplusplus 13 | # ifdef __GNUC__ 14 | # pragma GCC diagnostic ignored "-Wlong-long" 15 | # endif 16 | extern "C" { 17 | #endif 18 | 19 | #define crypto_kdf_hkdf_sha512_KEYBYTES crypto_auth_hmacsha512_BYTES 20 | SODIUM_EXPORT 21 | size_t crypto_kdf_hkdf_sha512_keybytes(void); 22 | 23 | #define crypto_kdf_hkdf_sha512_BYTES_MIN 0U 24 | SODIUM_EXPORT 25 | size_t crypto_kdf_hkdf_sha512_bytes_min(void); 26 | 27 | #define crypto_kdf_hkdf_sha512_BYTES_MAX (0xff * crypto_auth_hmacsha512_BYTES) 28 | SODIUM_EXPORT 29 | size_t crypto_kdf_hkdf_sha512_bytes_max(void); 30 | 31 | SODIUM_EXPORT 32 | int crypto_kdf_hkdf_sha512_extract(unsigned char prk[crypto_kdf_hkdf_sha512_KEYBYTES], 33 | const unsigned char *salt, size_t salt_len, 34 | const unsigned char *ikm, size_t ikm_len) 35 | __attribute__ ((nonnull(1))); 36 | 37 | SODIUM_EXPORT 38 | void crypto_kdf_hkdf_sha512_keygen(unsigned char prk[crypto_kdf_hkdf_sha512_KEYBYTES]) 39 | __attribute__ ((nonnull)); 40 | 41 | SODIUM_EXPORT 42 | int crypto_kdf_hkdf_sha512_expand(unsigned char *out, size_t out_len, 43 | const char *ctx, size_t ctx_len, 44 | const unsigned char prk[crypto_kdf_hkdf_sha512_KEYBYTES]) 45 | __attribute__ ((nonnull(1))); 46 | 47 | /* ------------------------------------------------------------------------- */ 48 | 49 | typedef struct crypto_kdf_hkdf_sha512_state { 50 | crypto_auth_hmacsha512_state st; 51 | } crypto_kdf_hkdf_sha512_state; 52 | 53 | SODIUM_EXPORT 54 | size_t crypto_kdf_hkdf_sha512_statebytes(void); 55 | 56 | SODIUM_EXPORT 57 | int crypto_kdf_hkdf_sha512_extract_init(crypto_kdf_hkdf_sha512_state *state, 58 | const unsigned char *salt, size_t salt_len) 59 | __attribute__ ((nonnull(1))); 60 | 61 | SODIUM_EXPORT 62 | int crypto_kdf_hkdf_sha512_extract_update(crypto_kdf_hkdf_sha512_state *state, 63 | const unsigned char *ikm, size_t ikm_len) 64 | __attribute__ ((nonnull)); 65 | 66 | SODIUM_EXPORT 67 | int crypto_kdf_hkdf_sha512_extract_final(crypto_kdf_hkdf_sha512_state *state, 68 | unsigned char prk[crypto_kdf_hkdf_sha512_KEYBYTES]) 69 | __attribute__ ((nonnull)); 70 | 71 | #ifdef __cplusplus 72 | } 73 | #endif 74 | 75 | #endif 76 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_kx.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_kx_H 2 | #define crypto_kx_H 3 | 4 | #include 5 | 6 | #include "export.h" 7 | 8 | #ifdef __cplusplus 9 | # ifdef __GNUC__ 10 | # pragma GCC diagnostic ignored "-Wlong-long" 11 | # endif 12 | extern "C" { 13 | #endif 14 | 15 | #define crypto_kx_PUBLICKEYBYTES 32 16 | SODIUM_EXPORT 17 | size_t crypto_kx_publickeybytes(void); 18 | 19 | #define crypto_kx_SECRETKEYBYTES 32 20 | SODIUM_EXPORT 21 | size_t crypto_kx_secretkeybytes(void); 22 | 23 | #define crypto_kx_SEEDBYTES 32 24 | SODIUM_EXPORT 25 | size_t crypto_kx_seedbytes(void); 26 | 27 | #define crypto_kx_SESSIONKEYBYTES 32 28 | SODIUM_EXPORT 29 | size_t crypto_kx_sessionkeybytes(void); 30 | 31 | #define crypto_kx_PRIMITIVE "x25519blake2b" 32 | SODIUM_EXPORT 33 | const char *crypto_kx_primitive(void); 34 | 35 | SODIUM_EXPORT 36 | int crypto_kx_seed_keypair(unsigned char pk[crypto_kx_PUBLICKEYBYTES], 37 | unsigned char sk[crypto_kx_SECRETKEYBYTES], 38 | const unsigned char seed[crypto_kx_SEEDBYTES]) 39 | __attribute__ ((nonnull)); 40 | 41 | SODIUM_EXPORT 42 | int crypto_kx_keypair(unsigned char pk[crypto_kx_PUBLICKEYBYTES], 43 | unsigned char sk[crypto_kx_SECRETKEYBYTES]) 44 | __attribute__ ((nonnull)); 45 | 46 | SODIUM_EXPORT 47 | int crypto_kx_client_session_keys(unsigned char rx[crypto_kx_SESSIONKEYBYTES], 48 | unsigned char tx[crypto_kx_SESSIONKEYBYTES], 49 | const unsigned char client_pk[crypto_kx_PUBLICKEYBYTES], 50 | const unsigned char client_sk[crypto_kx_SECRETKEYBYTES], 51 | const unsigned char server_pk[crypto_kx_PUBLICKEYBYTES]) 52 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull(3, 4, 5))); 53 | 54 | SODIUM_EXPORT 55 | int crypto_kx_server_session_keys(unsigned char rx[crypto_kx_SESSIONKEYBYTES], 56 | unsigned char tx[crypto_kx_SESSIONKEYBYTES], 57 | const unsigned char server_pk[crypto_kx_PUBLICKEYBYTES], 58 | const unsigned char server_sk[crypto_kx_SECRETKEYBYTES], 59 | const unsigned char client_pk[crypto_kx_PUBLICKEYBYTES]) 60 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull(3, 4, 5))); 61 | 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_onetimeauth.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_onetimeauth_H 2 | #define crypto_onetimeauth_H 3 | 4 | #include 5 | 6 | #include "crypto_onetimeauth_poly1305.h" 7 | #include "export.h" 8 | 9 | #ifdef __cplusplus 10 | # ifdef __GNUC__ 11 | # pragma GCC diagnostic ignored "-Wlong-long" 12 | # endif 13 | extern "C" { 14 | #endif 15 | 16 | typedef crypto_onetimeauth_poly1305_state crypto_onetimeauth_state; 17 | 18 | SODIUM_EXPORT 19 | size_t crypto_onetimeauth_statebytes(void); 20 | 21 | #define crypto_onetimeauth_BYTES crypto_onetimeauth_poly1305_BYTES 22 | SODIUM_EXPORT 23 | size_t crypto_onetimeauth_bytes(void); 24 | 25 | #define crypto_onetimeauth_KEYBYTES crypto_onetimeauth_poly1305_KEYBYTES 26 | SODIUM_EXPORT 27 | size_t crypto_onetimeauth_keybytes(void); 28 | 29 | #define crypto_onetimeauth_PRIMITIVE "poly1305" 30 | SODIUM_EXPORT 31 | const char *crypto_onetimeauth_primitive(void); 32 | 33 | SODIUM_EXPORT 34 | int crypto_onetimeauth(unsigned char *out, const unsigned char *in, 35 | unsigned long long inlen, const unsigned char *k) 36 | __attribute__ ((nonnull(1, 4))); 37 | 38 | SODIUM_EXPORT 39 | int crypto_onetimeauth_verify(const unsigned char *h, const unsigned char *in, 40 | unsigned long long inlen, const unsigned char *k) 41 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull(1, 4))); 42 | 43 | SODIUM_EXPORT 44 | int crypto_onetimeauth_init(crypto_onetimeauth_state *state, 45 | const unsigned char *key) __attribute__ ((nonnull)); 46 | 47 | SODIUM_EXPORT 48 | int crypto_onetimeauth_update(crypto_onetimeauth_state *state, 49 | const unsigned char *in, 50 | unsigned long long inlen) 51 | __attribute__ ((nonnull(1))); 52 | 53 | SODIUM_EXPORT 54 | int crypto_onetimeauth_final(crypto_onetimeauth_state *state, 55 | unsigned char *out) __attribute__ ((nonnull)); 56 | 57 | SODIUM_EXPORT 58 | void crypto_onetimeauth_keygen(unsigned char k[crypto_onetimeauth_KEYBYTES]) 59 | __attribute__ ((nonnull)); 60 | 61 | #ifdef __cplusplus 62 | } 63 | #endif 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_onetimeauth_poly1305.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_onetimeauth_poly1305_H 2 | #define crypto_onetimeauth_poly1305_H 3 | 4 | #ifdef __cplusplus 5 | # ifdef __GNUC__ 6 | # pragma GCC diagnostic ignored "-Wlong-long" 7 | # endif 8 | extern "C" { 9 | #endif 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | #include 16 | 17 | #include "export.h" 18 | 19 | typedef struct CRYPTO_ALIGN(16) crypto_onetimeauth_poly1305_state { 20 | unsigned char opaque[256]; 21 | } crypto_onetimeauth_poly1305_state; 22 | 23 | SODIUM_EXPORT 24 | size_t crypto_onetimeauth_poly1305_statebytes(void); 25 | 26 | #define crypto_onetimeauth_poly1305_BYTES 16U 27 | SODIUM_EXPORT 28 | size_t crypto_onetimeauth_poly1305_bytes(void); 29 | 30 | #define crypto_onetimeauth_poly1305_KEYBYTES 32U 31 | SODIUM_EXPORT 32 | size_t crypto_onetimeauth_poly1305_keybytes(void); 33 | 34 | SODIUM_EXPORT 35 | int crypto_onetimeauth_poly1305(unsigned char *out, 36 | const unsigned char *in, 37 | unsigned long long inlen, 38 | const unsigned char *k) 39 | __attribute__ ((nonnull(1, 4))); 40 | 41 | SODIUM_EXPORT 42 | int crypto_onetimeauth_poly1305_verify(const unsigned char *h, 43 | const unsigned char *in, 44 | unsigned long long inlen, 45 | const unsigned char *k) 46 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull(1, 4))); 47 | 48 | SODIUM_EXPORT 49 | int crypto_onetimeauth_poly1305_init(crypto_onetimeauth_poly1305_state *state, 50 | const unsigned char *key) 51 | __attribute__ ((nonnull)); 52 | 53 | SODIUM_EXPORT 54 | int crypto_onetimeauth_poly1305_update(crypto_onetimeauth_poly1305_state *state, 55 | const unsigned char *in, 56 | unsigned long long inlen) 57 | __attribute__ ((nonnull(1))); 58 | 59 | SODIUM_EXPORT 60 | int crypto_onetimeauth_poly1305_final(crypto_onetimeauth_poly1305_state *state, 61 | unsigned char *out) 62 | __attribute__ ((nonnull)); 63 | 64 | SODIUM_EXPORT 65 | void crypto_onetimeauth_poly1305_keygen(unsigned char k[crypto_onetimeauth_poly1305_KEYBYTES]) 66 | __attribute__ ((nonnull)); 67 | 68 | #ifdef __cplusplus 69 | } 70 | #endif 71 | 72 | #endif 73 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_scalarmult.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_scalarmult_H 2 | #define crypto_scalarmult_H 3 | 4 | #include 5 | 6 | #include "crypto_scalarmult_curve25519.h" 7 | #include "export.h" 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | #define crypto_scalarmult_BYTES crypto_scalarmult_curve25519_BYTES 14 | SODIUM_EXPORT 15 | size_t crypto_scalarmult_bytes(void); 16 | 17 | #define crypto_scalarmult_SCALARBYTES crypto_scalarmult_curve25519_SCALARBYTES 18 | SODIUM_EXPORT 19 | size_t crypto_scalarmult_scalarbytes(void); 20 | 21 | #define crypto_scalarmult_PRIMITIVE "curve25519" 22 | SODIUM_EXPORT 23 | const char *crypto_scalarmult_primitive(void); 24 | 25 | SODIUM_EXPORT 26 | int crypto_scalarmult_base(unsigned char *q, const unsigned char *n) 27 | __attribute__ ((nonnull)); 28 | 29 | /* 30 | * NOTE: Do not use the result of this function directly for key exchange. 31 | * 32 | * Hash the result with the public keys in order to compute a shared 33 | * secret key: H(q || client_pk || server_pk) 34 | * 35 | * Or unless this is not an option, use the crypto_kx() API instead. 36 | */ 37 | SODIUM_EXPORT 38 | int crypto_scalarmult(unsigned char *q, const unsigned char *n, 39 | const unsigned char *p) 40 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull)); 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_scalarmult_curve25519.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_scalarmult_curve25519_H 2 | #define crypto_scalarmult_curve25519_H 3 | 4 | #include 5 | 6 | #include "export.h" 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | #define crypto_scalarmult_curve25519_BYTES 32U 13 | SODIUM_EXPORT 14 | size_t crypto_scalarmult_curve25519_bytes(void); 15 | 16 | #define crypto_scalarmult_curve25519_SCALARBYTES 32U 17 | SODIUM_EXPORT 18 | size_t crypto_scalarmult_curve25519_scalarbytes(void); 19 | 20 | /* 21 | * NOTE: Do not use the result of this function directly for key exchange. 22 | * 23 | * Hash the result with the public keys in order to compute a shared 24 | * secret key: H(q || client_pk || server_pk) 25 | * 26 | * Or unless this is not an option, use the crypto_kx() API instead. 27 | */ 28 | SODIUM_EXPORT 29 | int crypto_scalarmult_curve25519(unsigned char *q, const unsigned char *n, 30 | const unsigned char *p) 31 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull)); 32 | 33 | SODIUM_EXPORT 34 | int crypto_scalarmult_curve25519_base(unsigned char *q, 35 | const unsigned char *n) 36 | __attribute__ ((nonnull)); 37 | 38 | #ifdef __cplusplus 39 | } 40 | #endif 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_scalarmult_ed25519.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef crypto_scalarmult_ed25519_H 3 | #define crypto_scalarmult_ed25519_H 4 | 5 | #include 6 | 7 | #include "export.h" 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | #define crypto_scalarmult_ed25519_BYTES 32U 14 | SODIUM_EXPORT 15 | size_t crypto_scalarmult_ed25519_bytes(void); 16 | 17 | #define crypto_scalarmult_ed25519_SCALARBYTES 32U 18 | SODIUM_EXPORT 19 | size_t crypto_scalarmult_ed25519_scalarbytes(void); 20 | 21 | /* 22 | * NOTE: Do not use the result of this function directly for key exchange. 23 | * 24 | * Hash the result with the public keys in order to compute a shared 25 | * secret key: H(q || client_pk || server_pk) 26 | * 27 | * Or unless this is not an option, use the crypto_kx() API instead. 28 | */ 29 | SODIUM_EXPORT 30 | int crypto_scalarmult_ed25519(unsigned char *q, const unsigned char *n, 31 | const unsigned char *p) 32 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull)); 33 | 34 | SODIUM_EXPORT 35 | int crypto_scalarmult_ed25519_noclamp(unsigned char *q, const unsigned char *n, 36 | const unsigned char *p) 37 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull)); 38 | 39 | SODIUM_EXPORT 40 | int crypto_scalarmult_ed25519_base(unsigned char *q, const unsigned char *n) 41 | __attribute__ ((nonnull)); 42 | 43 | SODIUM_EXPORT 44 | int crypto_scalarmult_ed25519_base_noclamp(unsigned char *q, const unsigned char *n) 45 | __attribute__ ((nonnull)); 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_scalarmult_ristretto255.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef crypto_scalarmult_ristretto255_H 3 | #define crypto_scalarmult_ristretto255_H 4 | 5 | #include 6 | 7 | #include "export.h" 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | #define crypto_scalarmult_ristretto255_BYTES 32U 14 | SODIUM_EXPORT 15 | size_t crypto_scalarmult_ristretto255_bytes(void); 16 | 17 | #define crypto_scalarmult_ristretto255_SCALARBYTES 32U 18 | SODIUM_EXPORT 19 | size_t crypto_scalarmult_ristretto255_scalarbytes(void); 20 | 21 | /* 22 | * NOTE: Do not use the result of this function directly for key exchange. 23 | * 24 | * Hash the result with the public keys in order to compute a shared 25 | * secret key: H(q || client_pk || server_pk) 26 | * 27 | * Or unless this is not an option, use the crypto_kx() API instead. 28 | */ 29 | SODIUM_EXPORT 30 | int crypto_scalarmult_ristretto255(unsigned char *q, const unsigned char *n, 31 | const unsigned char *p) 32 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull)); 33 | 34 | SODIUM_EXPORT 35 | int crypto_scalarmult_ristretto255_base(unsigned char *q, 36 | const unsigned char *n) 37 | __attribute__ ((nonnull)); 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_secretbox_xchacha20poly1305.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_secretbox_xchacha20poly1305_H 2 | #define crypto_secretbox_xchacha20poly1305_H 3 | 4 | #include 5 | #include "crypto_stream_xchacha20.h" 6 | #include "export.h" 7 | 8 | #ifdef __cplusplus 9 | # ifdef __GNUC__ 10 | # pragma GCC diagnostic ignored "-Wlong-long" 11 | # endif 12 | extern "C" { 13 | #endif 14 | 15 | #define crypto_secretbox_xchacha20poly1305_KEYBYTES 32U 16 | SODIUM_EXPORT 17 | size_t crypto_secretbox_xchacha20poly1305_keybytes(void); 18 | 19 | #define crypto_secretbox_xchacha20poly1305_NONCEBYTES 24U 20 | SODIUM_EXPORT 21 | size_t crypto_secretbox_xchacha20poly1305_noncebytes(void); 22 | 23 | #define crypto_secretbox_xchacha20poly1305_MACBYTES 16U 24 | SODIUM_EXPORT 25 | size_t crypto_secretbox_xchacha20poly1305_macbytes(void); 26 | 27 | #define crypto_secretbox_xchacha20poly1305_MESSAGEBYTES_MAX \ 28 | (crypto_stream_xchacha20_MESSAGEBYTES_MAX - crypto_secretbox_xchacha20poly1305_MACBYTES) 29 | SODIUM_EXPORT 30 | size_t crypto_secretbox_xchacha20poly1305_messagebytes_max(void); 31 | 32 | SODIUM_EXPORT 33 | int crypto_secretbox_xchacha20poly1305_easy(unsigned char *c, 34 | const unsigned char *m, 35 | unsigned long long mlen, 36 | const unsigned char *n, 37 | const unsigned char *k) 38 | __attribute__ ((nonnull(1, 4, 5))); 39 | 40 | SODIUM_EXPORT 41 | int crypto_secretbox_xchacha20poly1305_open_easy(unsigned char *m, 42 | const unsigned char *c, 43 | unsigned long long clen, 44 | const unsigned char *n, 45 | const unsigned char *k) 46 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull(2, 4, 5))); 47 | 48 | SODIUM_EXPORT 49 | int crypto_secretbox_xchacha20poly1305_detached(unsigned char *c, 50 | unsigned char *mac, 51 | const unsigned char *m, 52 | unsigned long long mlen, 53 | const unsigned char *n, 54 | const unsigned char *k) 55 | __attribute__ ((nonnull(1, 2, 5, 6))); 56 | 57 | SODIUM_EXPORT 58 | int crypto_secretbox_xchacha20poly1305_open_detached(unsigned char *m, 59 | const unsigned char *c, 60 | const unsigned char *mac, 61 | unsigned long long clen, 62 | const unsigned char *n, 63 | const unsigned char *k) 64 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull(2, 3, 5, 6))); 65 | 66 | #ifdef __cplusplus 67 | } 68 | #endif 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_secretbox_xsalsa20poly1305.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_secretbox_xsalsa20poly1305_H 2 | #define crypto_secretbox_xsalsa20poly1305_H 3 | 4 | #include 5 | #include "crypto_stream_xsalsa20.h" 6 | #include "export.h" 7 | 8 | #ifdef __cplusplus 9 | # ifdef __GNUC__ 10 | # pragma GCC diagnostic ignored "-Wlong-long" 11 | # endif 12 | extern "C" { 13 | #endif 14 | 15 | #define crypto_secretbox_xsalsa20poly1305_KEYBYTES 32U 16 | SODIUM_EXPORT 17 | size_t crypto_secretbox_xsalsa20poly1305_keybytes(void); 18 | 19 | #define crypto_secretbox_xsalsa20poly1305_NONCEBYTES 24U 20 | SODIUM_EXPORT 21 | size_t crypto_secretbox_xsalsa20poly1305_noncebytes(void); 22 | 23 | #define crypto_secretbox_xsalsa20poly1305_MACBYTES 16U 24 | SODIUM_EXPORT 25 | size_t crypto_secretbox_xsalsa20poly1305_macbytes(void); 26 | 27 | /* Only for the libsodium API - The NaCl compatibility API would require BOXZEROBYTES extra bytes */ 28 | #define crypto_secretbox_xsalsa20poly1305_MESSAGEBYTES_MAX \ 29 | (crypto_stream_xsalsa20_MESSAGEBYTES_MAX - crypto_secretbox_xsalsa20poly1305_MACBYTES) 30 | SODIUM_EXPORT 31 | size_t crypto_secretbox_xsalsa20poly1305_messagebytes_max(void); 32 | 33 | SODIUM_EXPORT 34 | int crypto_secretbox_xsalsa20poly1305(unsigned char *c, 35 | const unsigned char *m, 36 | unsigned long long mlen, 37 | const unsigned char *n, 38 | const unsigned char *k) 39 | __attribute__ ((nonnull(1, 4, 5))); 40 | 41 | SODIUM_EXPORT 42 | int crypto_secretbox_xsalsa20poly1305_open(unsigned char *m, 43 | const unsigned char *c, 44 | unsigned long long clen, 45 | const unsigned char *n, 46 | const unsigned char *k) 47 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull(2, 4, 5))); 48 | 49 | SODIUM_EXPORT 50 | void crypto_secretbox_xsalsa20poly1305_keygen( 51 | unsigned char k[crypto_secretbox_xsalsa20poly1305_KEYBYTES]) 52 | __attribute__ ((nonnull)); 53 | 54 | /* -- NaCl compatibility interface ; Requires padding -- */ 55 | 56 | #define crypto_secretbox_xsalsa20poly1305_BOXZEROBYTES 16U 57 | SODIUM_EXPORT 58 | size_t crypto_secretbox_xsalsa20poly1305_boxzerobytes(void); 59 | 60 | #define crypto_secretbox_xsalsa20poly1305_ZEROBYTES \ 61 | (crypto_secretbox_xsalsa20poly1305_BOXZEROBYTES + \ 62 | crypto_secretbox_xsalsa20poly1305_MACBYTES) 63 | SODIUM_EXPORT 64 | size_t crypto_secretbox_xsalsa20poly1305_zerobytes(void); 65 | 66 | #ifdef __cplusplus 67 | } 68 | #endif 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_shorthash.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_shorthash_H 2 | #define crypto_shorthash_H 3 | 4 | #include 5 | 6 | #include "crypto_shorthash_siphash24.h" 7 | #include "export.h" 8 | 9 | #ifdef __cplusplus 10 | # ifdef __GNUC__ 11 | # pragma GCC diagnostic ignored "-Wlong-long" 12 | # endif 13 | extern "C" { 14 | #endif 15 | 16 | #define crypto_shorthash_BYTES crypto_shorthash_siphash24_BYTES 17 | SODIUM_EXPORT 18 | size_t crypto_shorthash_bytes(void); 19 | 20 | #define crypto_shorthash_KEYBYTES crypto_shorthash_siphash24_KEYBYTES 21 | SODIUM_EXPORT 22 | size_t crypto_shorthash_keybytes(void); 23 | 24 | #define crypto_shorthash_PRIMITIVE "siphash24" 25 | SODIUM_EXPORT 26 | const char *crypto_shorthash_primitive(void); 27 | 28 | SODIUM_EXPORT 29 | int crypto_shorthash(unsigned char *out, const unsigned char *in, 30 | unsigned long long inlen, const unsigned char *k) 31 | __attribute__ ((nonnull(1, 4))); 32 | 33 | SODIUM_EXPORT 34 | void crypto_shorthash_keygen(unsigned char k[crypto_shorthash_KEYBYTES]) 35 | __attribute__ ((nonnull)); 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_shorthash_siphash24.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_shorthash_siphash24_H 2 | #define crypto_shorthash_siphash24_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | # ifdef __GNUC__ 9 | # pragma GCC diagnostic ignored "-Wlong-long" 10 | # endif 11 | extern "C" { 12 | #endif 13 | 14 | /* -- 64-bit output -- */ 15 | 16 | #define crypto_shorthash_siphash24_BYTES 8U 17 | SODIUM_EXPORT 18 | size_t crypto_shorthash_siphash24_bytes(void); 19 | 20 | #define crypto_shorthash_siphash24_KEYBYTES 16U 21 | SODIUM_EXPORT 22 | size_t crypto_shorthash_siphash24_keybytes(void); 23 | 24 | SODIUM_EXPORT 25 | int crypto_shorthash_siphash24(unsigned char *out, const unsigned char *in, 26 | unsigned long long inlen, const unsigned char *k) 27 | __attribute__ ((nonnull(1, 4))); 28 | 29 | #ifndef SODIUM_LIBRARY_MINIMAL 30 | /* -- 128-bit output -- */ 31 | 32 | #define crypto_shorthash_siphashx24_BYTES 16U 33 | SODIUM_EXPORT 34 | size_t crypto_shorthash_siphashx24_bytes(void); 35 | 36 | #define crypto_shorthash_siphashx24_KEYBYTES 16U 37 | SODIUM_EXPORT 38 | size_t crypto_shorthash_siphashx24_keybytes(void); 39 | 40 | SODIUM_EXPORT 41 | int crypto_shorthash_siphashx24(unsigned char *out, const unsigned char *in, 42 | unsigned long long inlen, const unsigned char *k) 43 | __attribute__ ((nonnull(1, 4))); 44 | #endif 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_sign_edwards25519sha512batch.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_sign_edwards25519sha512batch_H 2 | #define crypto_sign_edwards25519sha512batch_H 3 | 4 | /* 5 | * WARNING: This construction was a prototype, which should not be used 6 | * any more in new projects. 7 | * 8 | * crypto_sign_edwards25519sha512batch is provided for applications 9 | * initially built with NaCl, but as recommended by the author of this 10 | * construction, new applications should use ed25519 instead. 11 | * 12 | * In Sodium, you should use the high-level crypto_sign_*() functions instead. 13 | */ 14 | 15 | #include 16 | #include "export.h" 17 | 18 | #ifdef __cplusplus 19 | # ifdef __GNUC__ 20 | # pragma GCC diagnostic ignored "-Wlong-long" 21 | # endif 22 | extern "C" { 23 | #endif 24 | 25 | #define crypto_sign_edwards25519sha512batch_BYTES 64U 26 | #define crypto_sign_edwards25519sha512batch_PUBLICKEYBYTES 32U 27 | #define crypto_sign_edwards25519sha512batch_SECRETKEYBYTES (32U + 32U) 28 | #define crypto_sign_edwards25519sha512batch_MESSAGEBYTES_MAX (SODIUM_SIZE_MAX - crypto_sign_edwards25519sha512batch_BYTES) 29 | 30 | SODIUM_EXPORT 31 | int crypto_sign_edwards25519sha512batch(unsigned char *sm, 32 | unsigned long long *smlen_p, 33 | const unsigned char *m, 34 | unsigned long long mlen, 35 | const unsigned char *sk) 36 | __attribute__ ((deprecated)) __attribute__ ((nonnull(1, 5))); 37 | 38 | SODIUM_EXPORT 39 | int crypto_sign_edwards25519sha512batch_open(unsigned char *m, 40 | unsigned long long *mlen_p, 41 | const unsigned char *sm, 42 | unsigned long long smlen, 43 | const unsigned char *pk) 44 | __attribute__ ((deprecated)) __attribute__ ((nonnull(3, 5))); 45 | 46 | SODIUM_EXPORT 47 | int crypto_sign_edwards25519sha512batch_keypair(unsigned char *pk, 48 | unsigned char *sk) 49 | __attribute__ ((deprecated)) __attribute__ ((nonnull)); 50 | 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_stream.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_stream_H 2 | #define crypto_stream_H 3 | 4 | /* 5 | * WARNING: This is just a stream cipher. It is NOT authenticated encryption. 6 | * While it provides some protection against eavesdropping, it does NOT 7 | * provide any security against active attacks. 8 | * Unless you know what you're doing, what you are looking for is probably 9 | * the crypto_box functions. 10 | */ 11 | 12 | #include 13 | 14 | #include "crypto_stream_xsalsa20.h" 15 | #include "export.h" 16 | 17 | #ifdef __cplusplus 18 | # ifdef __GNUC__ 19 | # pragma GCC diagnostic ignored "-Wlong-long" 20 | # endif 21 | extern "C" { 22 | #endif 23 | 24 | #define crypto_stream_KEYBYTES crypto_stream_xsalsa20_KEYBYTES 25 | SODIUM_EXPORT 26 | size_t crypto_stream_keybytes(void); 27 | 28 | #define crypto_stream_NONCEBYTES crypto_stream_xsalsa20_NONCEBYTES 29 | SODIUM_EXPORT 30 | size_t crypto_stream_noncebytes(void); 31 | 32 | #define crypto_stream_MESSAGEBYTES_MAX crypto_stream_xsalsa20_MESSAGEBYTES_MAX 33 | SODIUM_EXPORT 34 | size_t crypto_stream_messagebytes_max(void); 35 | 36 | #define crypto_stream_PRIMITIVE "xsalsa20" 37 | SODIUM_EXPORT 38 | const char *crypto_stream_primitive(void); 39 | 40 | SODIUM_EXPORT 41 | int crypto_stream(unsigned char *c, unsigned long long clen, 42 | const unsigned char *n, const unsigned char *k) 43 | __attribute__ ((nonnull)); 44 | 45 | SODIUM_EXPORT 46 | int crypto_stream_xor(unsigned char *c, const unsigned char *m, 47 | unsigned long long mlen, const unsigned char *n, 48 | const unsigned char *k) 49 | __attribute__ ((nonnull)); 50 | 51 | SODIUM_EXPORT 52 | void crypto_stream_keygen(unsigned char k[crypto_stream_KEYBYTES]) 53 | __attribute__ ((nonnull)); 54 | 55 | #ifdef __cplusplus 56 | } 57 | #endif 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_stream_salsa20.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_stream_salsa20_H 2 | #define crypto_stream_salsa20_H 3 | 4 | /* 5 | * WARNING: This is just a stream cipher. It is NOT authenticated encryption. 6 | * While it provides some protection against eavesdropping, it does NOT 7 | * provide any security against active attacks. 8 | * Unless you know what you're doing, what you are looking for is probably 9 | * the crypto_box functions. 10 | */ 11 | 12 | #include 13 | #include 14 | #include "export.h" 15 | 16 | #ifdef __cplusplus 17 | # ifdef __GNUC__ 18 | # pragma GCC diagnostic ignored "-Wlong-long" 19 | # endif 20 | extern "C" { 21 | #endif 22 | 23 | #define crypto_stream_salsa20_KEYBYTES 32U 24 | SODIUM_EXPORT 25 | size_t crypto_stream_salsa20_keybytes(void); 26 | 27 | #define crypto_stream_salsa20_NONCEBYTES 8U 28 | SODIUM_EXPORT 29 | size_t crypto_stream_salsa20_noncebytes(void); 30 | 31 | #define crypto_stream_salsa20_MESSAGEBYTES_MAX SODIUM_SIZE_MAX 32 | SODIUM_EXPORT 33 | size_t crypto_stream_salsa20_messagebytes_max(void); 34 | 35 | SODIUM_EXPORT 36 | int crypto_stream_salsa20(unsigned char *c, unsigned long long clen, 37 | const unsigned char *n, const unsigned char *k) 38 | __attribute__ ((nonnull)); 39 | 40 | SODIUM_EXPORT 41 | int crypto_stream_salsa20_xor(unsigned char *c, const unsigned char *m, 42 | unsigned long long mlen, const unsigned char *n, 43 | const unsigned char *k) 44 | __attribute__ ((nonnull)); 45 | 46 | SODIUM_EXPORT 47 | int crypto_stream_salsa20_xor_ic(unsigned char *c, const unsigned char *m, 48 | unsigned long long mlen, 49 | const unsigned char *n, uint64_t ic, 50 | const unsigned char *k) 51 | __attribute__ ((nonnull)); 52 | 53 | SODIUM_EXPORT 54 | void crypto_stream_salsa20_keygen(unsigned char k[crypto_stream_salsa20_KEYBYTES]) 55 | __attribute__ ((nonnull)); 56 | 57 | #ifdef __cplusplus 58 | } 59 | #endif 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_stream_salsa2012.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_stream_salsa2012_H 2 | #define crypto_stream_salsa2012_H 3 | 4 | /* 5 | * WARNING: This is just a stream cipher. It is NOT authenticated encryption. 6 | * While it provides some protection against eavesdropping, it does NOT 7 | * provide any security against active attacks. 8 | * Unless you know what you're doing, what you are looking for is probably 9 | * the crypto_box functions. 10 | */ 11 | 12 | #include 13 | #include "export.h" 14 | 15 | #ifdef __cplusplus 16 | # ifdef __GNUC__ 17 | # pragma GCC diagnostic ignored "-Wlong-long" 18 | # endif 19 | extern "C" { 20 | #endif 21 | 22 | #define crypto_stream_salsa2012_KEYBYTES 32U 23 | SODIUM_EXPORT 24 | size_t crypto_stream_salsa2012_keybytes(void); 25 | 26 | #define crypto_stream_salsa2012_NONCEBYTES 8U 27 | SODIUM_EXPORT 28 | size_t crypto_stream_salsa2012_noncebytes(void); 29 | 30 | #define crypto_stream_salsa2012_MESSAGEBYTES_MAX SODIUM_SIZE_MAX 31 | SODIUM_EXPORT 32 | size_t crypto_stream_salsa2012_messagebytes_max(void); 33 | 34 | SODIUM_EXPORT 35 | int crypto_stream_salsa2012(unsigned char *c, unsigned long long clen, 36 | const unsigned char *n, const unsigned char *k) 37 | __attribute__ ((nonnull)); 38 | 39 | SODIUM_EXPORT 40 | int crypto_stream_salsa2012_xor(unsigned char *c, const unsigned char *m, 41 | unsigned long long mlen, const unsigned char *n, 42 | const unsigned char *k) 43 | __attribute__ ((nonnull)); 44 | 45 | SODIUM_EXPORT 46 | void crypto_stream_salsa2012_keygen(unsigned char k[crypto_stream_salsa2012_KEYBYTES]) 47 | __attribute__ ((nonnull)); 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_stream_salsa208.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_stream_salsa208_H 2 | #define crypto_stream_salsa208_H 3 | 4 | /* 5 | * WARNING: This is just a stream cipher. It is NOT authenticated encryption. 6 | * While it provides some protection against eavesdropping, it does NOT 7 | * provide any security against active attacks. 8 | * Unless you know what you're doing, what you are looking for is probably 9 | * the crypto_box functions. 10 | */ 11 | 12 | #include 13 | #include "export.h" 14 | 15 | #ifdef __cplusplus 16 | # ifdef __GNUC__ 17 | # pragma GCC diagnostic ignored "-Wlong-long" 18 | # endif 19 | extern "C" { 20 | #endif 21 | 22 | #define crypto_stream_salsa208_KEYBYTES 32U 23 | SODIUM_EXPORT 24 | size_t crypto_stream_salsa208_keybytes(void) 25 | __attribute__ ((deprecated)); 26 | 27 | #define crypto_stream_salsa208_NONCEBYTES 8U 28 | SODIUM_EXPORT 29 | size_t crypto_stream_salsa208_noncebytes(void) 30 | __attribute__ ((deprecated)); 31 | 32 | #define crypto_stream_salsa208_MESSAGEBYTES_MAX SODIUM_SIZE_MAX 33 | SODIUM_EXPORT 34 | size_t crypto_stream_salsa208_messagebytes_max(void) 35 | __attribute__ ((deprecated)); 36 | 37 | SODIUM_EXPORT 38 | int crypto_stream_salsa208(unsigned char *c, unsigned long long clen, 39 | const unsigned char *n, const unsigned char *k) 40 | __attribute__ ((deprecated)) __attribute__ ((nonnull)); 41 | 42 | SODIUM_EXPORT 43 | int crypto_stream_salsa208_xor(unsigned char *c, const unsigned char *m, 44 | unsigned long long mlen, const unsigned char *n, 45 | const unsigned char *k) 46 | __attribute__ ((deprecated)) __attribute__ ((nonnull)); 47 | 48 | SODIUM_EXPORT 49 | void crypto_stream_salsa208_keygen(unsigned char k[crypto_stream_salsa208_KEYBYTES]) 50 | __attribute__ ((deprecated)) __attribute__ ((nonnull)); 51 | 52 | #ifdef __cplusplus 53 | } 54 | #endif 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_stream_xchacha20.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_stream_xchacha20_H 2 | #define crypto_stream_xchacha20_H 3 | 4 | /* 5 | * WARNING: This is just a stream cipher. It is NOT authenticated encryption. 6 | * While it provides some protection against eavesdropping, it does NOT 7 | * provide any security against active attacks. 8 | * Unless you know what you're doing, what you are looking for is probably 9 | * the crypto_box functions. 10 | */ 11 | 12 | #include 13 | #include 14 | #include "export.h" 15 | 16 | #ifdef __cplusplus 17 | # ifdef __GNUC__ 18 | # pragma GCC diagnostic ignored "-Wlong-long" 19 | # endif 20 | extern "C" { 21 | #endif 22 | 23 | #define crypto_stream_xchacha20_KEYBYTES 32U 24 | SODIUM_EXPORT 25 | size_t crypto_stream_xchacha20_keybytes(void); 26 | 27 | #define crypto_stream_xchacha20_NONCEBYTES 24U 28 | SODIUM_EXPORT 29 | size_t crypto_stream_xchacha20_noncebytes(void); 30 | 31 | #define crypto_stream_xchacha20_MESSAGEBYTES_MAX SODIUM_SIZE_MAX 32 | SODIUM_EXPORT 33 | size_t crypto_stream_xchacha20_messagebytes_max(void); 34 | 35 | SODIUM_EXPORT 36 | int crypto_stream_xchacha20(unsigned char *c, unsigned long long clen, 37 | const unsigned char *n, const unsigned char *k) 38 | __attribute__ ((nonnull)); 39 | 40 | SODIUM_EXPORT 41 | int crypto_stream_xchacha20_xor(unsigned char *c, const unsigned char *m, 42 | unsigned long long mlen, const unsigned char *n, 43 | const unsigned char *k) 44 | __attribute__ ((nonnull)); 45 | 46 | SODIUM_EXPORT 47 | int crypto_stream_xchacha20_xor_ic(unsigned char *c, const unsigned char *m, 48 | unsigned long long mlen, 49 | const unsigned char *n, uint64_t ic, 50 | const unsigned char *k) 51 | __attribute__ ((nonnull)); 52 | 53 | SODIUM_EXPORT 54 | void crypto_stream_xchacha20_keygen(unsigned char k[crypto_stream_xchacha20_KEYBYTES]) 55 | __attribute__ ((nonnull)); 56 | 57 | #ifdef __cplusplus 58 | } 59 | #endif 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_stream_xsalsa20.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_stream_xsalsa20_H 2 | #define crypto_stream_xsalsa20_H 3 | 4 | /* 5 | * WARNING: This is just a stream cipher. It is NOT authenticated encryption. 6 | * While it provides some protection against eavesdropping, it does NOT 7 | * provide any security against active attacks. 8 | * Unless you know what you're doing, what you are looking for is probably 9 | * the crypto_box functions. 10 | */ 11 | 12 | #include 13 | #include 14 | #include "export.h" 15 | 16 | #ifdef __cplusplus 17 | # ifdef __GNUC__ 18 | # pragma GCC diagnostic ignored "-Wlong-long" 19 | # endif 20 | extern "C" { 21 | #endif 22 | 23 | #define crypto_stream_xsalsa20_KEYBYTES 32U 24 | SODIUM_EXPORT 25 | size_t crypto_stream_xsalsa20_keybytes(void); 26 | 27 | #define crypto_stream_xsalsa20_NONCEBYTES 24U 28 | SODIUM_EXPORT 29 | size_t crypto_stream_xsalsa20_noncebytes(void); 30 | 31 | #define crypto_stream_xsalsa20_MESSAGEBYTES_MAX SODIUM_SIZE_MAX 32 | SODIUM_EXPORT 33 | size_t crypto_stream_xsalsa20_messagebytes_max(void); 34 | 35 | SODIUM_EXPORT 36 | int crypto_stream_xsalsa20(unsigned char *c, unsigned long long clen, 37 | const unsigned char *n, const unsigned char *k) 38 | __attribute__ ((nonnull)); 39 | 40 | SODIUM_EXPORT 41 | int crypto_stream_xsalsa20_xor(unsigned char *c, const unsigned char *m, 42 | unsigned long long mlen, const unsigned char *n, 43 | const unsigned char *k) 44 | __attribute__ ((nonnull)); 45 | 46 | SODIUM_EXPORT 47 | int crypto_stream_xsalsa20_xor_ic(unsigned char *c, const unsigned char *m, 48 | unsigned long long mlen, 49 | const unsigned char *n, uint64_t ic, 50 | const unsigned char *k) 51 | __attribute__ ((nonnull)); 52 | 53 | SODIUM_EXPORT 54 | void crypto_stream_xsalsa20_keygen(unsigned char k[crypto_stream_xsalsa20_KEYBYTES]) 55 | __attribute__ ((nonnull)); 56 | 57 | #ifdef __cplusplus 58 | } 59 | #endif 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_verify_16.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_verify_16_H 2 | #define crypto_verify_16_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_verify_16_BYTES 16U 12 | SODIUM_EXPORT 13 | size_t crypto_verify_16_bytes(void); 14 | 15 | SODIUM_EXPORT 16 | int crypto_verify_16(const unsigned char *x, const unsigned char *y) 17 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull)); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_verify_32.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_verify_32_H 2 | #define crypto_verify_32_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_verify_32_BYTES 32U 12 | SODIUM_EXPORT 13 | size_t crypto_verify_32_bytes(void); 14 | 15 | SODIUM_EXPORT 16 | int crypto_verify_32(const unsigned char *x, const unsigned char *y) 17 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull)); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/crypto_verify_64.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_verify_64_H 2 | #define crypto_verify_64_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_verify_64_BYTES 64U 12 | SODIUM_EXPORT 13 | size_t crypto_verify_64_bytes(void); 14 | 15 | SODIUM_EXPORT 16 | int crypto_verify_64(const unsigned char *x, const unsigned char *y) 17 | __attribute__ ((warn_unused_result)) __attribute__ ((nonnull)); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/export.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef sodium_export_H 3 | #define sodium_export_H 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | #if !defined(__clang__) && !defined(__GNUC__) 10 | # ifdef __attribute__ 11 | # undef __attribute__ 12 | # endif 13 | # define __attribute__(a) 14 | #endif 15 | 16 | #ifdef SODIUM_STATIC 17 | # define SODIUM_EXPORT 18 | # define SODIUM_EXPORT_WEAK 19 | #else 20 | # if defined(_MSC_VER) 21 | # ifdef SODIUM_DLL_EXPORT 22 | # define SODIUM_EXPORT __declspec(dllexport) 23 | # else 24 | # define SODIUM_EXPORT __declspec(dllimport) 25 | # endif 26 | # else 27 | # if defined(__SUNPRO_C) 28 | # ifndef __GNU_C__ 29 | # define SODIUM_EXPORT __attribute__ (visibility(__global)) 30 | # else 31 | # define SODIUM_EXPORT __attribute__ __global 32 | # endif 33 | # elif defined(_MSG_VER) 34 | # define SODIUM_EXPORT extern __declspec(dllexport) 35 | # else 36 | # define SODIUM_EXPORT __attribute__ ((visibility ("default"))) 37 | # endif 38 | # endif 39 | # if defined(__ELF__) && !defined(SODIUM_DISABLE_WEAK_FUNCTIONS) 40 | # define SODIUM_EXPORT_WEAK SODIUM_EXPORT __attribute__((weak)) 41 | # else 42 | # define SODIUM_EXPORT_WEAK SODIUM_EXPORT 43 | # endif 44 | #endif 45 | 46 | #ifndef CRYPTO_ALIGN 47 | # if defined(__INTEL_COMPILER) || defined(_MSC_VER) 48 | # define CRYPTO_ALIGN(x) __declspec(align(x)) 49 | # else 50 | # define CRYPTO_ALIGN(x) __attribute__ ((aligned(x))) 51 | # endif 52 | #endif 53 | 54 | #define SODIUM_MIN(A, B) ((A) < (B) ? (A) : (B)) 55 | #define SODIUM_SIZE_MAX SODIUM_MIN(UINT64_MAX, SIZE_MAX) 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/randombytes.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef randombytes_H 3 | #define randombytes_H 4 | 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | #include "export.h" 11 | 12 | #ifdef __cplusplus 13 | # ifdef __GNUC__ 14 | # pragma GCC diagnostic ignored "-Wlong-long" 15 | # endif 16 | extern "C" { 17 | #endif 18 | 19 | typedef struct randombytes_implementation { 20 | const char *(*implementation_name)(void); /* required */ 21 | uint32_t (*random)(void); /* required */ 22 | void (*stir)(void); /* optional */ 23 | uint32_t (*uniform)( 24 | const uint32_t upper_bound); /* optional, a default implementation will be used if NULL */ 25 | void (*buf)(void *const buf, const size_t size); /* required */ 26 | int (*close)(void); /* optional */ 27 | } randombytes_implementation; 28 | 29 | #define randombytes_BYTES_MAX SODIUM_MIN(SODIUM_SIZE_MAX, 0xffffffffUL) 30 | 31 | #define randombytes_SEEDBYTES 32U 32 | SODIUM_EXPORT 33 | size_t randombytes_seedbytes(void); 34 | 35 | SODIUM_EXPORT 36 | void randombytes_buf(void *const buf, const size_t size) 37 | __attribute__ ((nonnull)); 38 | 39 | SODIUM_EXPORT 40 | void randombytes_buf_deterministic(void *const buf, const size_t size, 41 | const unsigned char seed[randombytes_SEEDBYTES]) 42 | __attribute__ ((nonnull)); 43 | 44 | SODIUM_EXPORT 45 | uint32_t randombytes_random(void); 46 | 47 | SODIUM_EXPORT 48 | uint32_t randombytes_uniform(const uint32_t upper_bound); 49 | 50 | SODIUM_EXPORT 51 | void randombytes_stir(void); 52 | 53 | SODIUM_EXPORT 54 | int randombytes_close(void); 55 | 56 | SODIUM_EXPORT 57 | int randombytes_set_implementation(const randombytes_implementation *impl) 58 | __attribute__ ((nonnull)); 59 | 60 | SODIUM_EXPORT 61 | const char *randombytes_implementation_name(void); 62 | 63 | /* -- NaCl compatibility interface -- */ 64 | 65 | SODIUM_EXPORT 66 | void randombytes(unsigned char *const buf, const unsigned long long buf_len) 67 | __attribute__ ((nonnull)); 68 | 69 | #ifdef __cplusplus 70 | } 71 | #endif 72 | 73 | #endif 74 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/randombytes_internal_random.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef randombytes_internal_random_H 3 | #define randombytes_internal_random_H 4 | 5 | #include "export.h" 6 | #include "randombytes.h" 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | SODIUM_EXPORT 13 | extern struct randombytes_implementation randombytes_internal_implementation; 14 | 15 | /* Backwards compatibility with libsodium < 1.0.18 */ 16 | #define randombytes_salsa20_implementation randombytes_internal_implementation 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/randombytes_sysrandom.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef randombytes_sysrandom_H 3 | #define randombytes_sysrandom_H 4 | 5 | #include "export.h" 6 | #include "randombytes.h" 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | SODIUM_EXPORT 13 | extern struct randombytes_implementation randombytes_sysrandom_implementation; 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/runtime.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef sodium_runtime_H 3 | #define sodium_runtime_H 4 | 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | SODIUM_EXPORT_WEAK 12 | int sodium_runtime_has_neon(void); 13 | 14 | SODIUM_EXPORT_WEAK 15 | int sodium_runtime_has_armcrypto(void); 16 | 17 | SODIUM_EXPORT_WEAK 18 | int sodium_runtime_has_sse2(void); 19 | 20 | SODIUM_EXPORT_WEAK 21 | int sodium_runtime_has_sse3(void); 22 | 23 | SODIUM_EXPORT_WEAK 24 | int sodium_runtime_has_ssse3(void); 25 | 26 | SODIUM_EXPORT_WEAK 27 | int sodium_runtime_has_sse41(void); 28 | 29 | SODIUM_EXPORT_WEAK 30 | int sodium_runtime_has_avx(void); 31 | 32 | SODIUM_EXPORT_WEAK 33 | int sodium_runtime_has_avx2(void); 34 | 35 | SODIUM_EXPORT_WEAK 36 | int sodium_runtime_has_avx512f(void); 37 | 38 | SODIUM_EXPORT_WEAK 39 | int sodium_runtime_has_pclmul(void); 40 | 41 | SODIUM_EXPORT_WEAK 42 | int sodium_runtime_has_aesni(void); 43 | 44 | SODIUM_EXPORT_WEAK 45 | int sodium_runtime_has_rdrand(void); 46 | 47 | /* ------------------------------------------------------------------------- */ 48 | 49 | int _sodium_runtime_get_cpu_features(void); 50 | 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/include/sodium/version.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef sodium_version_H 3 | #define sodium_version_H 4 | 5 | #include "export.h" 6 | 7 | #define SODIUM_VERSION_STRING "1.0.19" 8 | 9 | #define SODIUM_LIBRARY_VERSION_MAJOR 26 10 | #define SODIUM_LIBRARY_VERSION_MINOR 1 11 | 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | SODIUM_EXPORT 18 | const char *sodium_version_string(void); 19 | 20 | SODIUM_EXPORT 21 | int sodium_library_version_major(void); 22 | 23 | SODIUM_EXPORT 24 | int sodium_library_version_minor(void); 25 | 26 | SODIUM_EXPORT 27 | int sodium_library_minimal(void); 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/libs/arm64-v8a/libpcap.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/wfbngrtl8812/src/main/cpp/libs/arm64-v8a/libpcap.a -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/libs/arm64-v8a/libsodium.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/wfbngrtl8812/src/main/cpp/libs/arm64-v8a/libsodium.so -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/libs/arm64-v8a/libunrooted_android.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/wfbngrtl8812/src/main/cpp/libs/arm64-v8a/libunrooted_android.so -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/libs/arm64-v8a/libusb1.0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/wfbngrtl8812/src/main/cpp/libs/arm64-v8a/libusb1.0.so -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/libs/armeabi-v7a/libpcap.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/wfbngrtl8812/src/main/cpp/libs/armeabi-v7a/libpcap.a -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/libs/armeabi-v7a/libpcap.so.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/wfbngrtl8812/src/main/cpp/libs/armeabi-v7a/libpcap.so.1 -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/libs/armeabi-v7a/libsodium.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/wfbngrtl8812/src/main/cpp/libs/armeabi-v7a/libsodium.so -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/libs/armeabi-v7a/libunrooted_android.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/wfbngrtl8812/src/main/cpp/libs/armeabi-v7a/libunrooted_android.so -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/libs/armeabi-v7a/libusb1.0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/wfbngrtl8812/src/main/cpp/libs/armeabi-v7a/libusb1.0.so -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/libs/armeabi-v7a/libusb1.0.so.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/wfbngrtl8812/src/main/cpp/libs/armeabi-v7a/libusb1.0.so.1 -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/libs/armeabi-v7a/libusb1.0.so.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/app/wfbngrtl8812/src/main/cpp/libs/armeabi-v7a/libusb1.0.so.2 -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/cpp/wfb_log.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #define WFB_ERR(...) \ 7 | do { \ 8 | __android_log_print(ANDROID_LOG_ERROR, "wfb-ng", __VA_ARGS__); \ 9 | } while (0) 10 | #define WFB_INFO(...) \ 11 | do { \ 12 | (void)0; /*__android_log_print(ANDROID_LOG_INFO, "wfb-ng", __VA_ARGS__);*/ \ 13 | } while (0) 14 | 15 | #define WFB_DBG(...) (void(0)) 16 | 17 | #define ANDROID_IPC_MSG(...) \ 18 | do { \ 19 | __android_log_print(ANDROID_LOG_INFO, "wfb-ng", __VA_ARGS__); \ 20 | } while (0) 21 | #define IPC_MSG(...) \ 22 | do { \ 23 | __android_log_print(ANDROID_LOG_INFO, "wfb-ng", __VA_ARGS__); \ 24 | } while (0) 25 | #define IPC_MSG_SEND() (void)0 26 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/java/com/openipc/wfbngrtl8812/WfbNGStats.java: -------------------------------------------------------------------------------- 1 | package com.openipc.wfbngrtl8812; 2 | 3 | import androidx.annotation.Keep; 4 | 5 | @Keep 6 | public class WfbNGStats { 7 | public final int count_p_all; 8 | public final int count_p_dec_err; 9 | public final int count_p_dec_ok; 10 | public final int count_p_fec_recovered; 11 | public final int count_p_lost; 12 | public final int count_p_bad; 13 | public final int count_p_override; 14 | public final int count_p_outgoing; 15 | 16 | public WfbNGStats(int cntPall, int cntDecErr, int cntDecOk, int cntFecRec, 17 | int cntLost, int cntBad, int cntOverride, int cntOutgoing) { 18 | count_p_all = cntPall; 19 | count_p_dec_err = cntDecErr; 20 | count_p_dec_ok = cntDecOk; 21 | count_p_fec_recovered = cntFecRec; 22 | count_p_lost = cntLost; 23 | count_p_bad = cntBad; 24 | count_p_override = cntOverride; 25 | count_p_outgoing = cntOutgoing; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/wfbngrtl8812/src/main/java/com/openipc/wfbngrtl8812/WfbNGStatsChanged.java: -------------------------------------------------------------------------------- 1 | package com.openipc.wfbngrtl8812; 2 | 3 | public interface WfbNGStatsChanged { 4 | void onWfbNgStatsChanged(final WfbNGStats data); 5 | } 6 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | plugins { 3 | alias(libs.plugins.androidApplication) apply false 4 | alias(libs.plugins.androidLibrary) apply false 5 | } 6 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. For more details, visit 12 | # https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app's APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Enables namespacing of each library's R class so that its R class includes only the 19 | # resources declared in the library itself and none from the library's dependencies, 20 | # thereby reducing the size of the R class for that library 21 | android.nonTransitiveRClass=true 22 | org.gradle.configuration-cache=true -------------------------------------------------------------------------------- /gradle/libs.versions.toml: -------------------------------------------------------------------------------- 1 | [versions] 2 | agp = "8.5.2" 3 | coreKtx = "1.13.1" 4 | appcompat = "1.7.0" 5 | material = "1.12.0" 6 | constraintlayout = "2.1.4" 7 | mpandroidchartVersion = "3.1.0" 8 | 9 | [libraries] 10 | core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" } 11 | appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" } 12 | material = { group = "com.google.android.material", name = "material", version.ref = "material" } 13 | constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" } 14 | philjay-mpandroidchart = { module = "com.github.Philjay:mpandroidchart", version.ref = "mpandroidchartVersion" } 15 | 16 | [plugins] 17 | androidApplication = { id = "com.android.application", version.ref = "agp" } 18 | androidLibrary = { id = "com.android.library", version.ref = "agp" } 19 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/PixelPilot/79152e6e98f3f6a47428bad072965f2eff6640e4/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Apr 01 09:15:16 EDT 2024 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto execute 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto execute 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :execute 68 | @rem Setup the command line 69 | 70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 71 | 72 | 73 | @rem Execute Gradle 74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 75 | 76 | :end 77 | @rem End local scope for the variables with windows NT shell 78 | if "%ERRORLEVEL%"=="0" goto mainEnd 79 | 80 | :fail 81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82 | rem the _cmd.exe /c_ return code! 83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 84 | exit /b 1 85 | 86 | :mainEnd 87 | if "%OS%"=="Windows_NT" endlocal 88 | 89 | :omega 90 | -------------------------------------------------------------------------------- /scripts/format_sources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # This script identifies the root git folder, dynamically extracts submodule paths from 3 | # .gitmodules (if present) without hardcoding them, excludes both submodule directories, any 4 | # directories matching the ".cxx" pattern, and the "./app/mavlink" folder (and its subdirectories), 5 | # finds all .c, .cpp, .h, and .hpp files, and runs clang-format on them. 6 | 7 | # Exit immediately if a command exits with a non-zero status. 8 | set -euo pipefail 9 | 10 | # Identify the root of the git repository and change to it. 11 | GIT_ROOT=$(git rev-parse --show-toplevel) 12 | cd "$GIT_ROOT" 13 | 14 | # Build an array to hold exclusion expressions. 15 | # Each exclusion is represented as a pair: "-path" and the pattern. 16 | exclusions_expr=() 17 | 18 | # Dynamically extract submodule paths using git config from .gitmodules. 19 | while IFS= read -r line; do 20 | # Each line has the format: "submodule..path " 21 | submodule=$(echo "$line" | awk '{print $2}') 22 | exclusions_expr+=( -path "./$submodule" ) 23 | done < <(git config --file .gitmodules --get-regexp path 2>/dev/null || true) 24 | 25 | # Exclude any directory (and its subdirectories) matching ".cxx" 26 | exclusions_expr+=( -path "*/.cxx/*" ) 27 | 28 | exclusions_expr+=( -path "./app/mavlink" -path "./app/wfbngrtl8812/src/main/cpp/include" -path "./app/videonative/src/main/cpp/libs/include" ) 29 | 30 | # Construct the find command arguments. 31 | find_args=() 32 | if [ ${#exclusions_expr[@]} -gt 0 ]; then 33 | find_args+=( \( ) 34 | # Iterate over the exclusions_expr array in steps of 2 (each pair: flag and pattern). 35 | for (( i=0; i<${#exclusions_expr[@]}; i+=2 )); do 36 | find_args+=( "${exclusions_expr[i]}" "${exclusions_expr[i+1]}" ) 37 | # Add -o between each exclusion pair, except after the last one. 38 | if (( i+2 < ${#exclusions_expr[@]} )); then 39 | find_args+=( -o ) 40 | fi 41 | done 42 | # Close the grouping and add -prune -o. 43 | find_args+=( \) -prune -o ) 44 | fi 45 | 46 | # Append the file-matching criteria. 47 | find_args+=( \( -name "*.c" -o -name "*.cpp" -o -name "*.h" -o -name "*.hpp" \) -print ) 48 | 49 | # Execute the find command and run clang-format on each file found. 50 | while IFS= read -r file; do 51 | echo "Running clang-format on: $file" 52 | clang-format -i "$file" 53 | done < <(find . "${find_args[@]}") 54 | 55 | echo "clang-format completed successfully." 56 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | google { 4 | content { 5 | includeGroupByRegex("com\\.android.*") 6 | includeGroupByRegex("com\\.google.*") 7 | includeGroupByRegex("androidx.*") 8 | } 9 | } 10 | mavenCentral() 11 | gradlePluginPortal() 12 | } 13 | } 14 | 15 | dependencyResolutionManagement { 16 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 17 | repositories { 18 | google() 19 | mavenCentral() 20 | maven { 21 | url "https://jitpack.io" 22 | } 23 | } 24 | } 25 | 26 | rootProject.name = "PixelPilot" 27 | include(":app") 28 | include(":app:videonative") 29 | include(":app:wfbngrtl8812") 30 | include(":app:mavlink") 31 | --------------------------------------------------------------------------------