добавил последовательность голда
This commit is contained in:
10
dependencies/control_system/client/main.cpp
vendored
10
dependencies/control_system/client/main.cpp
vendored
@@ -149,8 +149,6 @@ EXTERNC CP_Result CP_GetDemodulatorSettings(TSID sid, demodulator_settings& sett
|
||||
auto resp = clients[sid]->send_get_demodulator_settings(settings_com);
|
||||
if (resp == response_type::error)
|
||||
return ERROR;
|
||||
std::cout << "settings_com.rollof: " << settings_com.rollof << std::endl;
|
||||
std::cout << "settings_com.gain: " << settings_com.gain << std::endl;
|
||||
settings = reinterpret_cast<demodulator_settings&>(settings_com);
|
||||
return OK;
|
||||
}
|
||||
@@ -169,7 +167,7 @@ EXTERNC CP_Result CP_GetDemodulatorState(TSID sid, demodulator_state &state){
|
||||
return ERROR;
|
||||
demodulator_state_com state_com;
|
||||
auto resp = clients[sid]->send_get_demodulator_state(state_com);
|
||||
|
||||
|
||||
if (resp == response_type::error)
|
||||
{
|
||||
std::cout << "error" << std::endl;
|
||||
@@ -184,7 +182,7 @@ EXTERNC CP_Result CP_GetDemodulatorState(TSID sid, demodulator_state &state){
|
||||
{
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
EXTERNC CP_Result CP_GetModulatorState(TSID sid, modulator_state &state){
|
||||
std::shared_lock lock(mtx);
|
||||
@@ -1029,6 +1027,8 @@ EXTERNC CP_Result CP_GetDemodulatorParams(TSID sid, const char *demodulator_para
|
||||
demod_val = getdemodulator_value::type_pack;
|
||||
else if (param_name == "is_pilots")
|
||||
demod_val = getdemodulator_value::is_pilots;
|
||||
else if (param_name == "is_pilots_insert")
|
||||
demod_val = getdemodulator_value::is_pilots_insert;
|
||||
else return ERROR;
|
||||
|
||||
auto resp = clients[sid]->send_get_demodulator_param(demod_val, par_from_server);
|
||||
@@ -1079,6 +1079,8 @@ EXTERNC CP_Result CP_DemodulatorParams(TSID sid, const char *demodulator_param,
|
||||
demod_val = demodulator_value::attitude_signals;
|
||||
else if (param_name == "reset_cinc")
|
||||
demod_val = demodulator_value::is_reset_CinC;
|
||||
else if (param_name == "is_pilots_insert")
|
||||
demod_val = demodulator_value::is_pilots_insert;
|
||||
else return ERROR;
|
||||
auto resp = clients[sid]->send_set_demodulator_param(demod_val,value);
|
||||
if (resp == response_type::error)
|
||||
|
@@ -715,9 +715,10 @@ response_type system_client::send_get_qos_params(std::string &node, const name_c
|
||||
return result;
|
||||
}
|
||||
|
||||
response_type system_client::send_set_qos_settings_json(const std::string &json_string, bool is_enable){
|
||||
response_type system_client::send_set_qos_settings_json(const std::string &json_string, bool is_enable)
|
||||
{
|
||||
std::scoped_lock lock(cmd_in_progress_mtx);
|
||||
uint32_t curr_id { ++cmd_id };
|
||||
uint32_t curr_id{++cmd_id};
|
||||
cmd_header cmd_qos_header{curr_id, cmd_type::set_qos_settings_json};
|
||||
cmd_qos_settings qos_settings{json_string, is_enable};
|
||||
|
||||
@@ -730,9 +731,10 @@ response_type system_client::send_set_qos_settings_json(const std::string &json_
|
||||
return result;
|
||||
}
|
||||
|
||||
response_type system_client::send_get_qos_settings_json(std::string &json_string, bool &is_enable){
|
||||
response_type system_client::send_get_qos_settings_json(std::string &json_string, bool &is_enable)
|
||||
{
|
||||
std::scoped_lock lock(cmd_in_progress_mtx);
|
||||
uint32_t curr_id { ++cmd_id };
|
||||
uint32_t curr_id{++cmd_id};
|
||||
cmd_header cmd_qos_header{curr_id, cmd_type::get_qos_settings_json};
|
||||
cmd_qos_settings qos_settings{json_string, is_enable};
|
||||
|
||||
@@ -746,6 +748,7 @@ response_type system_client::send_get_qos_settings_json(std::string &json_string
|
||||
json_string = std::any_cast<cmd_qos_settings>(data_from_serv).json_string;
|
||||
is_enable = std::any_cast<cmd_qos_settings>(data_from_serv).is_enable;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -1035,4 +1038,4 @@ response_type system_client::send_get_network_settings(const network_value & cmd
|
||||
if (data_from_serv.has_value())
|
||||
value = std::any_cast<std::string>(data_from_serv);
|
||||
return result;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user