Skip to content

Commit

Permalink
added extra endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
vertiq-luca committed Jan 10, 2025
1 parent 4409930 commit ecdd6f7
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/drivers/actuators/vertiq_io/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,31 @@ parameters:
min: 0
max: 255
default: 0
VTQ_PHASE_LEAD:
description:
short: Module Param - The pulsing phase lead time
long: |
type: float
min: -1
max: 1
default: 0
VTQ_PLS_COEFF_0:
description:
short: Module Param - The pulsing coeff 0
long: |
type: float
min: -1000
max: 1000
default: 0
VTQ_TIMEOUT:
description:
short: Module Param - Timeout between control signals to disarm
long: |
This represents the number of seconds between control signals before the motor will assume that connection has been lost and attempt to slow itself to a stop.
type: float
min: 0
max: 1000
default: 0
VTQ_TELEM_IDS_1:
description:
short: Module IDs [0, 31] that you would like to request telemetry from
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ void VertiqConfigurationHandler::InitConfigurationClients(uint8_t object_id)

_prop_input_parser_client = new EscPropellerInputParserClient(object_id);
_client_manager->AddNewClient(_prop_input_parser_client);
_prop_motor_control_client = new PropellerMotorControlClient(object_id);
_client_manager->AddNewClient(_prop_motor_control_client);

#ifdef CONFIG_USE_IFCI_CONFIGURATION
_ifci_client = new IQUartFlightControllerInterfaceClient(object_id);
Expand All @@ -68,6 +70,8 @@ void VertiqConfigurationHandler::InitClientEntryWrappers()
AddNewClientEntry<uint8_t, int32_t>(param_find("VTQ_MOTOR_DIR"), &(_prop_input_parser_client->sign_));
AddNewClientEntry<uint8_t, int32_t>(param_find("VTQ_FC_DIR"), &(_prop_input_parser_client->flip_negative_));

AddNewClientEntry<float, float>(param_find("VTQ_TIMEOUT"), &(_prop_motor_control_client->timeout_));

#ifdef CONFIG_USE_IFCI_CONFIGURATION
AddNewClientEntry<uint8_t, int32_t>(param_find("VTQ_THROTTLE_CVI"), &(_ifci_client->throttle_cvi_));
#endif //CONFIG_USE_IFCI_CONFIGURATION
Expand All @@ -84,6 +88,10 @@ void VertiqConfigurationHandler::InitClientEntryWrappers()
&(_voltage_superposition_client->propeller_torque_offset_angle_));
AddNewClientEntry<float, float>(param_find("VTQ_PULSE_V_LIM"),
&(_pulsing_rectangular_input_parser_client->pulsing_voltage_limit_));
AddNewClientEntry<float, float>(param_find("VTQ_PHASE_LEAD"),
&(_voltage_superposition_client->phase_lead_time_));
AddNewClientEntry<float, float>(param_find("VTQ_PLS_COEFF_0"),
&(_voltage_superposition_client->poly_limit_zero_));
#endif //CONFIG_USE_PULSING_CONFIGURATION
}

Expand All @@ -92,6 +100,7 @@ void VertiqConfigurationHandler::UpdateClientsToNewObjId(uint8_t new_object_id)
_object_id_now = new_object_id;

DestroyAndRecreateClient<EscPropellerInputParserClient>(_prop_input_parser_client, new_object_id);
DestroyAndRecreateClient<PropellerMotorControlClient>(_prop_motor_control_client, new_object_id);

#ifdef CONFIG_USE_IFCI_CONFIGURATION
DestroyAndRecreateClient<IQUartFlightControllerInterfaceClient>(_ifci_client, new_object_id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include "entry_wrapper.hpp"
#include "vertiq_client_manager.hpp"
#include "iq-module-communication-cpp/inc/esc_propeller_input_parser_client.hpp"
#include "iq-module-communication-cpp/inc/propeller_motor_control_client.hpp"

#include "iq-module-communication-cpp/inc/arming_handler_client.hpp"
#include "iq-module-communication-cpp/inc/iquart_flight_controller_interface_client.hpp"
Expand Down Expand Up @@ -158,6 +159,7 @@ class VertiqConfigurationHandler
//Vertiq Client information
//Known Configuration Clients can be created as pointers to certain types of clients
EscPropellerInputParserClient *_prop_input_parser_client;
PropellerMotorControlClient *_prop_motor_control_client;

#ifdef CONFIG_USE_IFCI_CONFIGURATION
//Make all of the clients that we need to talk to the IFCI config params
Expand Down

0 comments on commit ecdd6f7

Please sign in to comment.