Skip to content

Commit

Permalink
Experimental: Trying to make public chnl method available
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesus Lopez Garcia authored and Jesus Lopez Garcia committed Jan 21, 2024
1 parent f3b7361 commit cc1be21
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 3 deletions.
86 changes: 84 additions & 2 deletions jni/rec/rec_shim.h
Original file line number Diff line number Diff line change
Expand Up @@ -5649,8 +5649,90 @@ struct __gs_gui_config
int (*get_sd_status)(void *, int, uint8_t *, uint32_t *, uint32_t *);
int (*play_pwm_buzzer)(void *, int, int, int);
int (*buzzer_enable_bat)(void *, _Bool);
void * gs_info;
int (*gs_modem_set_public_chnl)(void *ctx);
int (* gs_ext_fc_get_battery_mah)(void *ctx,uint16_t *mah);
int (* gs_ext_fc_get_battery_usage)(void *ctx,uint16_t *percent);
int (* gs_ext_fc_get_battery_power)(void *ctx,uint16_t *power);
int (* gs_ext_fc_set_arming_disabled)(void *ctx,uint8_t arming_disabled);
int (* gs_ext_fc_get_arming_disabled)(void *ctx,uint32_t *arming_disabled);
int (* gs_ext_fc_get_version)(void *ctx,uint8_t *major,uint8_t *minor,uint8_t *patch_level);
int (* gs_ext_fc_set_sbus_mode)(void *ctx,uint8_t sbus_mode);
int (* gs_ext_fc_get_racing_osd_info)(void *ctx,void *osdInfo);//(void *ctx,DUSS_MSG_FC_RACING_DRONE_OSD_PUSH_t *osdInfo);
int (* gs_ext_fc_get_osd_position)(void *ctx,int num,bool *activated,int *x,int *y);
int (* gs_ext_fc_get_units)(void *ctx,uint8_t *units);
int (* gs_ext_fc_get_fly_mode)(void *ctx,uint16_t *fly_mode);
int (* gs_ext_fc_get_rtc_date)(void *ctx,void *rtc);//(void *ctx,DUSS_MSG_EXT_FC_RTC_t *rtc);
int (* gs_ext_fc_get_esc_temperature)(void *ctx,uint8_t *temp);
void (* dummy_1)(void);
void (* dummy_2)(void);
int (* gs_media_adjust_fov)(void *ctx,uint32_t scaling,int16_t x,int16_t y);
int (* gs_bl_set_brightness_value)(void *ctx,uint8_t value);
int (* gs_bl_get_brightness_value)(void *ctx,uint8_t *value);
void (* get_device_volume)(void);
void (* set_device_volume)(void);
void (* gs_imu_acc_gyro_calibrate)(char *configfile);
void (* gs_imu_initialize)(void);
void (* gs_imu_destroy)(void);
void (* gs_imu_start)(void);
void (* gs_imu_stop)(void);
void (* gs_imu_get_init_status)(void);
void (* gs_imu_get_attitude)(void);
int (* gs_sd_format_wrap)(void *ctx);
int (* gs_sd_get_info_wrap)(void *ctx,void *sd_info);//(void *ctx,gs_local_sd_info_t *sd_info)
int (* gs_get_battery_info)(void *ctx,void *bat_info);//(void *ctx,DUSS_MSG_RC_BAT_INFO_t *bat_info);
int (* gs_get_device_active_state)(void *ctx,int device_type);
int (* gs_av_in_us_get_brightness)(void *ctx,uint8_t *value);
int (* gs_av_in_us_set_brightness)(void *ctx,uint8_t value);
void (* dummy_3)(void);
int (* gs_av_in_us_get_satutation)(void *ctx,uint8_t *value);
int (* gs_av_in_us_set_saturaton)(void *ctx,uint8_t value);
int (* gs_reset_user_settings)(void *ctx);
int (* gs_ui_event_tracking)(void *ctx,int32_t value,uint8_t event_type,uint8_t event_sub_id);
void (* gs_get_real_flight_stat)(uint8_t *stat);
void (* gs_set_flight_stat)(uint8_t stat);
int (* gs_watermarker_us_get_flag)(void *ctx,uint8_t *value);
int (* gs_watermarker_us_set_flag)(void *ctx,uint8_t value);
int (* gs_watermarker_us_reset)(void *ctx);
int (* gs_player_open)(void *ctx,char *filename);
int (* gs_player_close)(void *ctx);
int (* gs_player_stop)(void *ctx);
int (* gs_player_pause)(void *ctx);
int (* gs_player_resume)(void *ctx);
int (* gs_player_seek_time)(void *ctx,uint32_t time);
int (* gs_player_seek)(void *ctx,uint32_t pos);
int (* gs_player_get_duration)(char *filename,uint32_t *duration);
int (* gs_player_get_cur_time)(void *ctx,uint32_t *cur_time,uint32_t *duration);
int (* gs_player_get_state)(void *ctx,uint32_t *state);
int (* gs_player_get_fileinfo)(char *filename,void *file_info);//(char *filename,vdec_video_file_info_t *file_info);
int (* gs_player_is_playing)(void *ctx,bool *is_playing);
int (* gs_player_delete_file)(char *filename);
int (* gs_send_camera_cmd_async)(void *event_obj,int cam_cmd,void *msg,uint32_t msg_len,uint16_t seq_id);//(duss_event_client *event_obj,int cam_cmd,void *msg,uint32_t msg_len,uint16_t seq_ id)
int (* gs_set_camera_param)(void *ctx,uint8_t param_type,uint8_t param);
int (* gs_uav_camera_get_rec_time)(void *ctx,int *mode,int *rec_time);
int (* gs_modem_pairing_control_wrap)(void *ctx,uint32_t ctrl);
void (* dummy_4)(void);
void (* dummy_5)(void);
void (* dummy_6)(void);
void (* dummy_7)(void);
void (* dummy_8)(void);
void (* dummy_9)(void);
void (* dummy_10)(void);
void (* dummy_11)(void);
void (* dummy_12)(void);
void (* dummy_13)(void);
void (* dummy_14)(void);
void (* dummy_15)(void);
void (* dummy_16)(void);
int (* gs_modem_get_link_state_wrap)(void *ctx,gs_link_stat_t *link_stat);
int (* gs_modem_get_bandwidth)(void *ctx,uint16_t *bandwidth);
int (* gs_modem_set_bandwidth)(void *ctx,uint16_t bandwidth);
int (* gs_modem_get_chnl)(void *ctx,uint16_t *chnl_id);
int (* gs_modem_set_chnl_scan_info)(void *ctx,uint8_t chnl_num,uint8_t bandwidth);
int (* gs_modem_rob_chnl_cancel)(void *ctx);
int (* gs_modem_rob_chnl)(void *ctx,uint16_t chnl_id);
int (* gs_modem_get_rob_left_time)(void *ctx,uint8_t *left_time);
int (* gs_modem_get_rob_flag)(void *ctx,uint8_t *flag);
int (* gs_modem_clear_rob_flag)(void *ctx);
int (* gs_modem_set_public_chnl)(void *ctx);
};

struct AVCodecParserContext
Expand Down
2 changes: 1 addition & 1 deletion jni/util/vtx_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void changeChannel(int8_t channel) {
DEBUG_PRINT("VTX_MANAGER: requesting to the goggles to set channel %d\n", channel);

if(channel == CHANNEL_PUBLIC){
gs_gui_config->gs_modem_set_public_chnl(gs_gui_config->gs_info);
gs_gui_config->gs_modem_set_public_chnl(gs_gui_config->ctx);
} else {
int8_t channelIdx = channel - 1;
setChannelPilotOriginal(userSettingsGetInstanceOriginal(), channelIdx, true);
Expand Down

0 comments on commit cc1be21

Please sign in to comment.