Skip to content

Commit

Permalink
删除 rpc 不需要的回调函数
Browse files Browse the repository at this point in the history
  • Loading branch information
sfxfs committed Oct 9, 2023
1 parent a4333ec commit 748b2e9
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cmake-single-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ jobs:
- name: Upload Artifact
uses: actions/upload-artifact@master
with:
name: UV Master For NanoPi Neo Core
name: uv-master-armhf-bin
path: ${{github.workspace}}/output
11 changes: 6 additions & 5 deletions user/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,12 @@ int main(int argc, char **argv)
}
}
} else {
printf(" ____ ____ _ __ __ ___ __ \n"
" / __ \\/ __ \\ | / / / |/ /___ ______/ /____ _____\n"
" / /_/ / / / / | / / / /|_/ / __ `/ ___/ __/ _ \\/ ___/\n"
"/ _, _/ /_/ /| |/ / / / / / /_/ (__ ) /_/ __/ / \n"
"/_/ |_|\\____/ |___/ /_/ /_/\\__,_/____/\\__/\\___/_/ \n");
printf( " _ \n"
" /\\ /\\/\\ /\\ /\\/\\ __ _ ___| |_ ___ _ __ \n"
"/ / \\ \\ \\ / / / \\ / _` / __| __/ _ \\ '__|\n"
"\\ \\_/ /\\ V / / /\\/\\ \\ (_| \\__ \\ || __/ | \n"
" \\___/ \\_/ \\/ \\/\\__,_|___/\\__\\___|_| \n"
" \n");
printf("info: starting uv-master app...\n");
rov_init(1);
for (;;) {
Expand Down
20 changes: 0 additions & 20 deletions user/server/handler/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,6 @@ cJSON *set_propeller_values_handler(jrpc_context *ctx, cJSON *params, cJSON *id)
return cJSON_CreateNull();
}

cJSON *set_propeller_parameters_handler(jrpc_context *ctx, cJSON *params, cJSON *id)
{
// to do ...
// propeller_params_read_from_root(&((propeller_t *)ctx->data)->front_right, cJSON_GetObjectItem(params, "front_right"));
// propeller_params_read_from_root(&((propeller_t *)ctx->data)->front_left, cJSON_GetObjectItem(params, "front_left"));
// propeller_params_read_from_root(&((propeller_t *)ctx->data)->center_right, cJSON_GetObjectItem(params, "center_right"));
// propeller_params_read_from_root(&((propeller_t *)ctx->data)->center_left, cJSON_GetObjectItem(params, "center_left"));
// propeller_params_read_from_root(&((propeller_t *)ctx->data)->back_right, cJSON_GetObjectItem(params, "back_right"));
// propeller_params_read_from_root(&((propeller_t *)ctx->data)->back_left, cJSON_GetObjectItem(params, "back_left"));
return cJSON_CreateNull();
}

cJSON *set_control_loop_parameters_handler(jrpc_context *ctx, cJSON *params, cJSON *id)
{
// to do ...
// pid_ctl_params_read_from_root(&((pid_scale_t *)ctx->data)->yaw, cJSON_GetObjectItem(params, "yaw_lock"));
// pid_ctl_params_read_from_root(&((pid_scale_t *)ctx->data)->depth, cJSON_GetObjectItem(params, "depth_lock"));
return cJSON_CreateNull();
}

cJSON *save_handler(jrpc_context *ctx, cJSON *params, cJSON *id)
{
rov_config_write_json_to_file(params);
Expand Down
2 changes: 0 additions & 2 deletions user/server/handler/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
cJSON *set_debug_mode_enabled_handler (jrpc_context *ctx, cJSON *params, cJSON *id);
cJSON *set_propeller_pwm_freq_calibration_handler (jrpc_context *ctx, cJSON *params, cJSON *id);
cJSON *set_propeller_values_handler (jrpc_context *ctx, cJSON *params, cJSON *id);
cJSON *set_propeller_parameters_handler (jrpc_context *ctx, cJSON *params, cJSON *id);
cJSON *set_control_loop_parameters_handler (jrpc_context *ctx, cJSON *params, cJSON *id);
cJSON *save_handler (jrpc_context *ctx, cJSON *params, cJSON *id);
cJSON *load_handler (jrpc_context *ctx, cJSON *params, cJSON *id);

Expand Down
2 changes: 0 additions & 2 deletions user/server/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ static void debug_handler_reg(struct rov_info* info)
jrpc_register_procedure(&server, set_debug_mode_enabled_handler, "set_debug_mode_enabled", &info->devCtl);
jrpc_register_procedure(&server, set_propeller_pwm_freq_calibration_handler, "set_propeller_pwm_freq_calibration", info);
jrpc_register_procedure(&server, set_propeller_values_handler, "set_propeller_values", info);
jrpc_register_procedure(&server, set_propeller_parameters_handler, "set_propeller_parameters", &info->propeller);
jrpc_register_procedure(&server, set_control_loop_parameters_handler, "set_control_loop_parameters", &info->pidScale);
jrpc_register_procedure(&server, load_handler, "load_parameters", info);
jrpc_register_procedure(&server, save_handler, "save_parameters", info);
}
Expand Down

0 comments on commit 748b2e9

Please sign in to comment.