Skip to content

Commit

Permalink
Merge pull request #9 from iq-motion-control/feature/update_params_co…
Browse files Browse the repository at this point in the history
…pyrights

updates for serial reliability, update all copyright dates, update ve…
  • Loading branch information
vertiq-jordan authored Sep 11, 2024
2 parents baea05b + a096fe9 commit 75edc77
Show file tree
Hide file tree
Showing 14 changed files with 80 additions and 83 deletions.
3 changes: 2 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,5 @@
url = https://gitlab.com/voxl-public/voxl-sdk/core-libs/libfc-sensor-api.git
[submodule "src/drivers/actuators/vertiq_io/iq-module-communication-cpp"]
path = src/drivers/actuators/vertiq_io/iq-module-communication-cpp
url = https://github.com/iq-motion-control/iq-module-communication-cpp.git
url = https://github.com/PX4/iq-module-communication-cpp.git
branch = master
2 changes: 1 addition & 1 deletion src/drivers/actuators/vertiq_io/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
############################################################################
#
# Copyright (c) 2021 PX4 Development Team. All rights reserved.
# Copyright (c) 2024 PX4 Development Team. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/actuators/vertiq_io/entry_wrapper.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/****************************************************************************
*
* Copyright (c) 2012-2024 PX4 Development Team. All rights reserved.
* Copyright (c) 2024 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down
58 changes: 29 additions & 29 deletions src/drivers/actuators/vertiq_io/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ serial_config:

actuator_output:
output_groups:
- param_prefix: VERTIQ_IO
group_label: 'ESCs'
channel_label: 'ESC'
- param_prefix: VTQ_IO
group_label: 'CVIs'
channel_label: 'CVI'
instance_start: 0
standard_params:
disarmed: { min: 0, max: 65535, default: 0 }
min: { min: 0, max: 65535, default: 0 }
Expand All @@ -20,15 +21,15 @@ actuator_output:
parameters:
- group: Vertiq IO
definitions:
VERTIQ_BAUD:
VTQ_BAUD:
description:
short: The IQUART driver's baud rate
long: |
The baud rate (in bits per second) used by the serial port connected with IQUART communication
type: int32
reboot_required: true
default: 115200
VERTIQ_NUM_CVS:
VTQ_NUM_CVS:
description:
short: The number of Vertiq IFCI parameters to use
long: |
Expand All @@ -38,28 +39,27 @@ parameters:
max: 16
reboot_required: true
default: 0
DISARM_TRIGGER:
VTQ_DISARM_TRIG:
description:
short: The triggered behavior sent to the motors on PX4 disarm
long: |
The behavior triggered when the flight controller disarms. You have the option to trigger your motors' disarm behaviors, set all motors to coast,
or set a predefined throttle setpoint
type: enum
values:
0: Use Mixer Defined Value
1: Send Explicit Disarm
2: Coast Motors
3: Set Predefined Velocity Setpoint
0: Send Explicit Disarm
1: Coast Motors
2: Set Predefined Velocity Setpoint
default: 0
DISARM_VELO:
VTQ_DISARM_VELO:
description:
short: Velocity sent when DISARM_TRIGGER is Set Predefined Velocity Setpoint
long: This is the velocity that will be sent to all motors when PX4 is disarmed and DISARM_TRIGGER is Set Predefined Velocity Setpoint
type: int32
min: 0
max: 100
default: 0
ARMING_BEHAVE:
VTQ_ARM_BEHAVE:
description:
short: The triggered behavior on PX4 arm
long: |
Expand All @@ -69,7 +69,7 @@ parameters:
0: Use Motor Arm Behavior
1: Send Explicit Arm Command
default: 0
TARGET_MODULE_ID:
VTQ_TRGT_MOD_ID:
description:
short: The Module ID of the module you would like to communicate with
long: |
Expand All @@ -78,15 +78,15 @@ parameters:
use this value to instantiate itself.
type: int32
default: 0
TRIGGER_READ:
VTQ_REDO_READ:
description:
short: Reinitialize the target module's values into the PX4 parameters
long: |
Setting this value to true will reinitialize PX4's IQUART connected parameters to the value stored on the currently targeted motor.
This is especially useful if your flight controller powered on before your connected modules
type: boolean
default: 0
THROTTLE_CVI:
VTQ_THROTTLE_CVI:
description:
short: Module Param - The module's Throttle Control Value Index
long: |
Expand All @@ -95,7 +95,7 @@ parameters:
min: 0
max: 255
default: 0
CONTROL_MODE:
VTQ_CONTROL_MODE:
description:
short: Module Param - The module's control mechanism
long: |
Expand All @@ -111,21 +111,21 @@ parameters:
1: Voltage
2: Velocity
default: 0
MAX_VELOCITY:
VTQ_MAX_VELOCITY:
description:
short: Module Param - Maximum velocity when CONTROL_MODE is set to Velocity
long: |
Only relevant in Velocity Mode. This is the velocity the controller will command at full throttle.
type: float
default: 0
MAX_VOLTS:
VTQ_MAX_VOLTS:
description:
short: Module Param - Maximum voltage when CONTROL_MODE is set to Voltage
long: |
Only relevant in Voltage Mode. This is the voltage the controller will command at full throttle.
type: float
default: 0
VERTIQ_MOTOR_DIR:
VTQ_MOTOR_DIR:
description:
short: Module Param - The direction that the module should spin
long: |
Expand All @@ -138,7 +138,7 @@ parameters:
3: 2D Counter Clockwise
4: 2D Clockwise
default: 0
VERTIQ_FC_DIR:
VTQ_FC_DIR:
description:
short: Module Param - If the flight controller uses 2D or 3D communication
long: |
Expand All @@ -149,28 +149,28 @@ parameters:
0: 2D
1: 3D
default: 0
ZERO_ANGLE:
VTQ_ZERO_ANGLE:
description:
short: Module Param - The encoder angle at which theta is zero
long: |
The encoder angle at which theta is zero. Adjust this number to change the location of 0 phase when pulsing.
type: float
default: 0
VELOCITY_CUTOFF:
VTQ_VELO_CUTOFF:
description:
short: Module Param - The minimum velocity required to allow pulsing
long: |
This is the velocity at which pulsing is allowed. Any velocity between VELOCITY_CUTOFF and -VELOCITY_CUTOFF will not pulse.
type: float
default: 0
TORQUE_OFF_ANGLE:
VTQ_TQUE_OFF_ANG:
description:
short: Module Param - Offsets pulse angle to allow for mechanical properties
long: |
This offsets where the pulse starts around the motor to allow for propeller mechanical properties.
type: float
default: 0
PULSE_VOLT_MODE:
VTQ_PULSE_V_MODE:
description:
short: Module Param - 0 = Supply Voltage Mode, 1 = Voltage Limit Mode
long: |
Expand All @@ -181,14 +181,14 @@ parameters:
0: Supply Voltage Mode
1: Voltage Limit Mode
default: 0
PULSE_VOLT_LIM:
VTQ_PULSE_V_LIM:
description:
short: Module Param - Max pulsing voltage limit when in Voltage Limit Mode
long: |
This sets the max pulsing voltage limit when in Voltage Limit Mode.
type: float
default: 0
X_CVI:
VTQ_X_CVI:
description:
short: Module Param - CVI for the X rectangular coordinate
long: |
Expand All @@ -197,7 +197,7 @@ parameters:
min: 0
max: 255
default: 0
Y_CVI:
VTQ_Y_CVI:
description:
short: Module Param - CVI for the Y rectangular coordinate
long: |
Expand All @@ -206,7 +206,7 @@ parameters:
min: 0
max: 255
default: 0
TELEM_IDS_1:
VTQ_TELEM_IDS_1:
description:
short: Module IDs [0, 31] that you would like to request telemetry from
long: |
Expand Down Expand Up @@ -247,7 +247,7 @@ parameters:
31: Module ID 31
reboot_required: true
default: 0
TELEM_IDS_2:
VTQ_TELEM_IDS_2:
description:
short: Module IDs [32, 62] that you would like to request telemetry from
long: |
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/actuators/vertiq_io/vertiq_client_manager.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/****************************************************************************
*
* Copyright (c) 2012-2024 PX4 Development Team. All rights reserved.
* Copyright (c) 2024 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/actuators/vertiq_io/vertiq_client_manager.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/****************************************************************************
*
* Copyright (c) 2012-2024 PX4 Development Team. All rights reserved.
* Copyright (c) 2024 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down
28 changes: 14 additions & 14 deletions src/drivers/actuators/vertiq_io/vertiq_configuration_handler.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/****************************************************************************
*
* Copyright (c) 2012-2024 PX4 Development Team. All rights reserved.
* Copyright (c) 2024 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -62,27 +62,27 @@ void VertiqConfigurationHandler::InitConfigurationClients(uint8_t object_id)

void VertiqConfigurationHandler::InitClientEntryWrappers()
{
AddNewClientEntry<float, float>(param_find("MAX_VELOCITY"), &(_prop_input_parser_client->velocity_max_));
AddNewClientEntry<float, float>(param_find("MAX_VOLTS"), &(_prop_input_parser_client->volts_max_));
AddNewClientEntry<uint8_t, int32_t>(param_find("CONTROL_MODE"), &(_prop_input_parser_client->mode_));
AddNewClientEntry<uint8_t, int32_t>(param_find("VERTIQ_MOTOR_DIR"), &(_prop_input_parser_client->sign_));
AddNewClientEntry<uint8_t, int32_t>(param_find("VERTIQ_FC_DIR"), &(_prop_input_parser_client->flip_negative_));
AddNewClientEntry<float, float>(param_find("VTQ_MAX_VELOCITY"), &(_prop_input_parser_client->velocity_max_));
AddNewClientEntry<float, float>(param_find("VTQ_MAX_VOLTS"), &(_prop_input_parser_client->volts_max_));
AddNewClientEntry<uint8_t, int32_t>(param_find("VTQ_CONTROL_MODE"), &(_prop_input_parser_client->mode_));
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_));

#ifdef CONFIG_USE_IFCI_CONFIGURATION
AddNewClientEntry<uint8_t, int32_t>(param_find("THROTTLE_CVI"), &(_ifci_client->throttle_cvi_));
AddNewClientEntry<uint8_t, int32_t>(param_find("VTQ_THROTTLE_CVI"), &(_ifci_client->throttle_cvi_));
#endif //CONFIG_USE_IFCI_CONFIGURATION

#ifdef CONFIG_USE_PULSING_CONFIGURATION
AddNewClientEntry<uint8_t, int32_t> (param_find("PULSE_VOLT_MODE"),
AddNewClientEntry<uint8_t, int32_t> (param_find("VTQ_PULSE_V_MODE"),
&(_pulsing_rectangular_input_parser_client->pulsing_voltage_mode_));
AddNewClientEntry<uint8_t, int32_t>(param_find("X_CVI"), &(_ifci_client->x_cvi_));
AddNewClientEntry<uint8_t, int32_t>(param_find("Y_CVI"), &(_ifci_client->y_cvi_));
AddNewClientEntry<float, float>(param_find("ZERO_ANGLE"), &(_voltage_superposition_client->zero_angle_));
AddNewClientEntry<float, float>(param_find("VELOCITY_CUTOFF"),
AddNewClientEntry<uint8_t, int32_t>(param_find("VTQ_X_CVI"), &(_ifci_client->x_cvi_));
AddNewClientEntry<uint8_t, int32_t>(param_find("VTQ_Y_CVI"), &(_ifci_client->y_cvi_));
AddNewClientEntry<float, float>(param_find("VTQ_ZERO_ANGLE"), &(_voltage_superposition_client->zero_angle_));
AddNewClientEntry<float, float>(param_find("VTQ_VELO_CUTOFF"),
&(_voltage_superposition_client->velocity_cutoff_));
AddNewClientEntry<float, float>(param_find("TORQUE_OFF_ANGLE"),
AddNewClientEntry<float, float>(param_find("VTQ_TQUE_OFF_ANG"),
&(_voltage_superposition_client->propeller_torque_offset_angle_));
AddNewClientEntry<float, float>(param_find("PULSE_VOLT_LIM"),
AddNewClientEntry<float, float>(param_find("VTQ_PULSE_V_LIM"),
&(_pulsing_rectangular_input_parser_client->pulsing_voltage_limit_));
#endif //CONFIG_USE_PULSING_CONFIGURATION
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/****************************************************************************
*
* Copyright (c) 2012-2024 PX4 Development Team. All rights reserved.
* Copyright (c) 2024 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down
6 changes: 1 addition & 5 deletions src/drivers/actuators/vertiq_io/vertiq_io.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/****************************************************************************
*
* Copyright (c) 2012-2024 PX4 Development Team. All rights reserved.
* Copyright (c) 2024 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -213,10 +213,6 @@ bool VertiqIo::updateOutputs(bool stop_motors, uint16_t outputs[MAX_ACTUATORS],
} else {
//Put the modules into coast
switch (_param_vertiq_disarm_behavior.get()) {
case USER_MIXER_VALUE:
OutputControls(outputs);
break;

case TRIGGER_MOTOR_DISARM:
_broadcast_arming_handler.motor_armed_.set(*_serial_interface.GetIquartInterface(), 0);
break;
Expand Down
Loading

0 comments on commit 75edc77

Please sign in to comment.