From 7d8b046a14ad8edabf55351067ac66ede914fcac Mon Sep 17 00:00:00 2001 From: dskart Date: Thu, 7 Mar 2019 16:56:51 -0500 Subject: [PATCH] removed unnecessary files --- inc/as5047_client.hpp | 82 ----------- inc/buffered_voltage_monitor_client.hpp | 87 ------------ inc/buzzer_control_client.hpp | 2 +- inc/encoder_client.hpp | 86 ------------ inc/safe_brushless_drive_client.hpp | 179 ------------------------ inc/temperature_estimator_client.hpp | 2 +- inc/voltage_superposition_client.hpp | 74 ---------- src/generic_interface.cpp | 2 +- 8 files changed, 3 insertions(+), 511 deletions(-) delete mode 100644 inc/as5047_client.hpp delete mode 100644 inc/buffered_voltage_monitor_client.hpp delete mode 100644 inc/encoder_client.hpp delete mode 100644 inc/safe_brushless_drive_client.hpp delete mode 100644 inc/voltage_superposition_client.hpp diff --git a/inc/as5047_client.hpp b/inc/as5047_client.hpp deleted file mode 100644 index 1a1e1a1..0000000 --- a/inc/as5047_client.hpp +++ /dev/null @@ -1,82 +0,0 @@ -/* - Copyright 2019 IQinetics Technologies, Inc support@iq-control.com - - This file is part of the IQ C++ API. - - IQ C++ API is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - IQ C++ API is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . -*/ - -/* - Name: as5047_client.hpp - Last update: 3/7/2019 by Raphael Van Hoffelen - Author: Matthew Piccoli - Contributors: Raphael Van Hoffelen -*/ - -#ifndef AS5047_CLIENT_H -#define AS5047_CLIENT_H - -#include "client_communication.hpp" - -const uint8_t kTypeAs5047 = 56; - -class As5047Client: public ClientAbstract{ - public: - As5047Client(uint8_t obj_idn): - ClientAbstract( kTypeAs5047, obj_idn), - angle_( kTypeAs5047, obj_idn, kSubAngle), - angle_source_( kTypeAs5047, obj_idn, kSubAngleSource), - settings1_( kTypeAs5047, obj_idn, kSubSettings1), - settings2_( kTypeAs5047, obj_idn, kSubSettings2), - diagnostic_( kTypeAs5047, obj_idn, kSubDiagnostic), - errfl_( kTypeAs5047, obj_idn, kSubErrfl), - one_time_program_(kTypeAs5047, obj_idn, kSubOneTimeProgram) - {}; - - // Client Entries - ClientEntry angle_; - ClientEntry angle_source_; - ClientEntry settings1_; - ClientEntry settings2_; - ClientEntry diagnostic_; - ClientEntry errfl_; - ClientEntryVoid one_time_program_; - - void ReadMsg(uint8_t* rx_data, uint8_t rx_length) - { - static const uint8_t kEntryLength = kSubOneTimeProgram+1; - ClientEntryAbstract* entry_array[kEntryLength] = { - &angle_, //0 - &angle_source_, //1 - &settings1_, //2 - &settings2_, //3 - &diagnostic_, //4 - &errfl_, //5 - &one_time_program_//6 - }; - - ParseMsg(rx_data, rx_length, entry_array, kEntryLength); - } - - private: - static const uint8_t kSubAngle = 0; - static const uint8_t kSubAngleSource = 1; - static const uint8_t kSubSettings1 = 2; - static const uint8_t kSubSettings2 = 3; - static const uint8_t kSubDiagnostic = 4; - static const uint8_t kSubErrfl = 5; - static const uint8_t kSubOneTimeProgram = 6; -}; - -#endif // AS5047_CLIENT_H diff --git a/inc/buffered_voltage_monitor_client.hpp b/inc/buffered_voltage_monitor_client.hpp deleted file mode 100644 index 71d072e..0000000 --- a/inc/buffered_voltage_monitor_client.hpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - Copyright 2019 IQinetics Technologies, Inc support@iq-control.com - - This file is part of the IQ C++ API. - - IQ C++ API is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - IQ C++ API is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . -*/ - -/* - Name: buffered_voltage_monitor_client.hpp - Last update: 3/7/2019 by Raphael Van Hoffelen - Author: Matthew Piccoli - Contributors: Raphael Van Hoffelen -*/ - -#ifndef BUFFERED_VOLTAGE_MONITOR_CLIENT_H -#define BUFFERED_VOLTAGE_MONITOR_CLIENT_H - -#include "client_communication.hpp" - -const uint8_t kTypeVoltageMonitor = 42; - -class BufferedVoltageMonitorClient: public ClientAbstract{ - public: - BufferedVoltageMonitorClient(uint8_t obj_idn): - ClientAbstract( kTypeVoltageMonitor, obj_idn), - volts_raw_( kTypeVoltageMonitor, obj_idn, kSubVoltsRaw), - volts_( kTypeVoltageMonitor, obj_idn, kSubVolts), - volts_gain_( kTypeVoltageMonitor, obj_idn, kSubVoltsGain), - filter_fs_( kTypeVoltageMonitor, obj_idn, kSubFilterFs), - filter_fc_( kTypeVoltageMonitor, obj_idn, kSubFilterFc) - {}; - - // Client Entries - ClientEntry volts_raw_; - ClientEntry volts_; - ClientEntry volts_gain_; - ClientEntry filter_fs_; - ClientEntry filter_fc_; - - void ReadMsg(uint8_t* rx_data, uint8_t rx_length) - { - static const uint8_t kEntryLength = kSubFilterFc+1; - ClientEntryAbstract* entry_array[kEntryLength] = { - &volts_raw_, // 0 - nullptr, // 1 - &volts_, // 2 - nullptr, // 3 - nullptr, // 4 - nullptr, // 5 - nullptr, // 6 - nullptr, // 7 - nullptr, // 8 - nullptr, // 9 - nullptr, // 10 - &volts_gain_, // 11 - nullptr, // 12 - nullptr, // 13 - nullptr, // 14 - nullptr, // 15 - &filter_fs_, // 16 - &filter_fc_ // 17 - }; - - ParseMsg(rx_data, rx_length, entry_array, kEntryLength); - } - - private: - static const uint8_t kSubVoltsRaw = 0; - static const uint8_t kSubVolts = 2; - static const uint8_t kSubVoltsGain = 11; - static const uint8_t kSubFilterFs = 16; - static const uint8_t kSubFilterFc = 17; -}; - -#endif // BUFFERED_VOLTAGE_MONITOR_CLIENT_H diff --git a/inc/buzzer_control_client.hpp b/inc/buzzer_control_client.hpp index b93f7d3..eb6371d 100644 --- a/inc/buzzer_control_client.hpp +++ b/inc/buzzer_control_client.hpp @@ -18,7 +18,7 @@ */ /* - Name: buffered_voltage_monitor_client.hpp + Name: buzzer_control_client.hpp Last update: 3/7/2019 by Raphael Van Hoffelen Author: Matthew Piccoli Contributors: Raphael Van Hoffelen diff --git a/inc/encoder_client.hpp b/inc/encoder_client.hpp deleted file mode 100644 index 4628c2a..0000000 --- a/inc/encoder_client.hpp +++ /dev/null @@ -1,86 +0,0 @@ -/* - Copyright 2019 IQinetics Technologies, Inc support@iq-control.com - - This file is part of the IQ C++ API. - - IQ C++ API is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - IQ C++ API is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . -*/ - -/* - Name: encoder_client.hpp - Last update: 3/7/2019 by Raphael Van Hoffelen - Author: Matthew Piccoli - Contributors: Raphael Van Hoffelen -*/ - -#ifndef ENCODER_CLIENT_H -#define ENCODER_CLIENT_H - -#include "client_communication.hpp" - -const uint8_t kTypeEncoder = 53; - -class EncoderClient: public ClientAbstract{ - public: - EncoderClient(uint8_t obj_idn): - ClientAbstract( kTypeEncoder, obj_idn), - zero_angle_( kTypeEncoder, obj_idn, kSubZeroAngle), - velocity_filter_fs_(kTypeEncoder, obj_idn, kSubVelocityFilterFs), - velocity_filter_fc_(kTypeEncoder, obj_idn, kSubVelocityFilterFc), - rev_( kTypeEncoder, obj_idn, kSubRev), - absolute_rev_( kTypeEncoder, obj_idn, kSubAbsoluteRev), - rad_( kTypeEncoder, obj_idn, kSubRad), - absolute_rad_( kTypeEncoder, obj_idn, kSubAbsoluteRad), - velocity_( kTypeEncoder, obj_idn, kSubVelocity) - {}; - - // Client Entries - ClientEntry zero_angle_; - ClientEntry velocity_filter_fs_; - ClientEntry velocity_filter_fc_; - ClientEntry rev_; - ClientEntry absolute_rev_; - ClientEntry rad_; - ClientEntry absolute_rad_; - ClientEntry velocity_; - - void ReadMsg(uint8_t* rx_data, uint8_t rx_length) - { - static const uint8_t kEntryLength = kSubVelocity+1; - ClientEntryAbstract* entry_array[kEntryLength] = { - &zero_angle_, // 0 - &velocity_filter_fs_, // 1 - &velocity_filter_fc_, // 2 - &rev_, // 3 - &absolute_rev_, // 4 - &rad_, // 5 - &absolute_rad_, // 6 - &velocity_ // 7 - }; - - ParseMsg(rx_data, rx_length, entry_array, kEntryLength); - } - - private: - static const uint8_t kSubZeroAngle = 0; - static const uint8_t kSubVelocityFilterFs = 1; - static const uint8_t kSubVelocityFilterFc = 2; - static const uint8_t kSubRev = 3; - static const uint8_t kSubAbsoluteRev = 4; - static const uint8_t kSubRad = 5; - static const uint8_t kSubAbsoluteRad = 6; - static const uint8_t kSubVelocity = 7; -}; - -#endif // ENCODER_CLIENT_H diff --git a/inc/safe_brushless_drive_client.hpp b/inc/safe_brushless_drive_client.hpp deleted file mode 100644 index b4433c1..0000000 --- a/inc/safe_brushless_drive_client.hpp +++ /dev/null @@ -1,179 +0,0 @@ -/* - Copyright 2019 IQinetics Technologies, Inc support@iq-control.com - - This file is part of the IQ C++ API. - - IQ C++ API is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - IQ C++ API is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . -*/ - -/* - Name: safe_brushless_drive_client.hpp - Last update: 3/7/2019 by Raphael Van Hoffelen - Author: Matthew Piccoli - Contributors: Raphael Van Hoffelen -*/ - -#ifndef SAFE_BRUSHLESS_DRIVE_CLIENT_HPP_ -#define SAFE_BRUSHLESS_DRIVE_CLIENT_HPP_ - -#include "client_communication.hpp" - -const uint8_t kTypeBrushlessDrive = 50; - -class SafeBrushlessDriveClient: public ClientAbstract{ - public: - SafeBrushlessDriveClient(uint8_t obj_idn): - ClientAbstract( kTypeBrushlessDrive, obj_idn), - drive_mode_( kTypeBrushlessDrive, obj_idn, kSubDriveMode), - drive_phase_pwm_( kTypeBrushlessDrive, obj_idn, kSubDrivePhasePwm), - drive_phase_volts_( kTypeBrushlessDrive, obj_idn, kSubDrivePhaseVolts), - drive_spin_pwm_( kTypeBrushlessDrive, obj_idn, kSubDriveSpinPwm), - drive_spin_volts_( kTypeBrushlessDrive, obj_idn, kSubDriveSpinVolts), - drive_brake_( kTypeBrushlessDrive, obj_idn, kSubDriveBrake), - drive_coast_( kTypeBrushlessDrive, obj_idn, kSubDriveCoast), - drive_angle_offset_(kTypeBrushlessDrive, obj_idn, kSubDriveAngleOffset), - drive_pwm_( kTypeBrushlessDrive, obj_idn, kSubDrivePwm), - drive_volts_( kTypeBrushlessDrive, obj_idn, kSubDriveVolts), - mech_lead_angle_( kTypeBrushlessDrive, obj_idn, kSubMechLeadAngle), - obs_supply_volts_( kTypeBrushlessDrive, obj_idn, kSubObsSupplyVolts), - obs_angle_( kTypeBrushlessDrive, obj_idn, kSubObsAngle), - obs_velocity_( kTypeBrushlessDrive, obj_idn, kSubObsVelocity), - motor_pole_pairs_( kTypeBrushlessDrive, obj_idn, kSubMotorPolePairs), - motor_emf_shape_( kTypeBrushlessDrive, obj_idn, kSubMotorEmfShape), - permute_wires_( kTypeBrushlessDrive, obj_idn, kSubPermuteWires), - calibration_angle_( kTypeBrushlessDrive, obj_idn, kSubOCalibrationAngle), - lead_time_( kTypeBrushlessDrive, obj_idn, kSubLeadTime), - commutation_hz_( kTypeBrushlessDrive, obj_idn, kSubCommutationHz), - phase_angle_( kTypeBrushlessDrive, obj_idn, kSubPhaseAngle), - motor_Kv_( kTypeBrushlessDrive, obj_idn, kSubMotorKv), - motor_R_ohm_( kTypeBrushlessDrive, obj_idn, kSubMotorROhm), - motor_I_max_( kTypeBrushlessDrive, obj_idn, kSubMotorIMax), - volts_limit_( kTypeBrushlessDrive, obj_idn, kSubVoltsLimit), - est_motor_amps_( kTypeBrushlessDrive, obj_idn, kSubEstMotorAmps), - est_motor_torque_( kTypeBrushlessDrive, obj_idn, kSubEstMotorTorque) - {}; - - // Client Entries - // Drive values - ClientEntry drive_mode_; - ClientEntry drive_phase_pwm_; - ClientEntry drive_phase_volts_; - ClientEntry drive_spin_pwm_; - ClientEntry drive_spin_volts_; - ClientEntryVoid drive_brake_; - ClientEntryVoid drive_coast_; - ClientEntry drive_angle_offset_; - ClientEntry drive_pwm_; - ClientEntry drive_volts_; - ClientEntry mech_lead_angle_; - // Measurements - ClientEntry obs_supply_volts_; - ClientEntry obs_angle_; - ClientEntry obs_velocity_; - // Motor parameters - ClientEntry motor_pole_pairs_; - ClientEntry motor_emf_shape_; - // Drive configuration - ClientEntry permute_wires_; - ClientEntry calibration_angle_; - ClientEntry lead_time_; - ClientEntry commutation_hz_; - // Fixed phase angle - ClientEntry phase_angle_; - // More motor parameters - ClientEntry motor_Kv_; - ClientEntry motor_R_ohm_; - ClientEntry motor_I_max_; - ClientEntry volts_limit_; - ClientEntry est_motor_amps_; - ClientEntry est_motor_torque_; - - void ReadMsg(uint8_t* rx_data, uint8_t rx_length) - { - static const uint8_t kEntryLength = kSubEstMotorTorque+1; - ClientEntryAbstract* entry_array[kEntryLength] = { - &drive_mode_, // 0 - &drive_phase_pwm_, // 1 - &drive_phase_volts_, // 2 - &drive_spin_pwm_, // 3 - &drive_spin_volts_, // 4 - &drive_brake_, // 5 - &drive_coast_, // 6 - &drive_angle_offset_, // 7 - &drive_pwm_, // 8 - &drive_volts_, // 9 - &mech_lead_angle_, // 10 - &obs_supply_volts_, // 11 - &obs_angle_, // 12 - &obs_velocity_, // 13 - &motor_pole_pairs_, // 14 - &motor_emf_shape_, // 15 - &permute_wires_, // 16 - &calibration_angle_, // 17 - &lead_time_, // 18 - &commutation_hz_, // 19 - &phase_angle_, // 20 - nullptr, // 21 - nullptr, // 22 - nullptr, // 23 - nullptr, // 24 - nullptr, // 25 - nullptr, // 26 - nullptr, // 27 - nullptr, // 28 - nullptr, // 29 - nullptr, // 30 - nullptr, // 31 - &motor_Kv_, // 32 - &motor_R_ohm_, // 33 - &motor_I_max_, // 34 - &volts_limit_, // 35 - &est_motor_amps_, // 36 - &est_motor_torque_ // 37 - }; - - ParseMsg(rx_data, rx_length, entry_array, kEntryLength); - } - - private: - static const uint8_t kSubDriveMode = 0; - static const uint8_t kSubDrivePhasePwm = 1; - static const uint8_t kSubDrivePhaseVolts = 2; - static const uint8_t kSubDriveSpinPwm = 3; - static const uint8_t kSubDriveSpinVolts = 4; - static const uint8_t kSubDriveBrake = 5; - static const uint8_t kSubDriveCoast = 6; - static const uint8_t kSubDriveAngleOffset = 7; - static const uint8_t kSubDrivePwm = 8; - static const uint8_t kSubDriveVolts = 9; - static const uint8_t kSubMechLeadAngle = 10; - static const uint8_t kSubObsSupplyVolts = 11; - static const uint8_t kSubObsAngle = 12; - static const uint8_t kSubObsVelocity = 13; - static const uint8_t kSubMotorPolePairs = 14; - static const uint8_t kSubMotorEmfShape = 15; - static const uint8_t kSubPermuteWires = 16; - static const uint8_t kSubOCalibrationAngle= 17; - static const uint8_t kSubLeadTime = 18; - static const uint8_t kSubCommutationHz = 19; - static const uint8_t kSubPhaseAngle = 20; - static const uint8_t kSubMotorKv = 32; - static const uint8_t kSubMotorROhm = 33; - static const uint8_t kSubMotorIMax = 34; - static const uint8_t kSubVoltsLimit = 35; - static const uint8_t kSubEstMotorAmps = 36; - static const uint8_t kSubEstMotorTorque = 37; -}; - -#endif /* SAFE_BRUSHLESS_DRIVE_CLIENT_HPP_ */ diff --git a/inc/temperature_estimator_client.hpp b/inc/temperature_estimator_client.hpp index 942b2d2..7086351 100644 --- a/inc/temperature_estimator_client.hpp +++ b/inc/temperature_estimator_client.hpp @@ -18,7 +18,7 @@ */ /* - Name: temperature_monitor_uc_client.hpp + Name: temperature_estimator_client.hpp Last update: 3/7/2019 by Raphael Van Hoffelen Author: Matthew Piccoli Contributors: Raphael Van Hoffelen diff --git a/inc/voltage_superposition_client.hpp b/inc/voltage_superposition_client.hpp deleted file mode 100644 index 5ed4973..0000000 --- a/inc/voltage_superposition_client.hpp +++ /dev/null @@ -1,74 +0,0 @@ -/* - Copyright 2019 IQinetics Technologies, Inc support@iq-control.com - - This file is part of the IQ C++ API. - - IQ C++ API is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - IQ C++ API is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . -*/ - -/* - Name: voltage_superposition_client.hpp - Last update: 3/7/2019 by Raphael Van Hoffelen - Author: Matthew Piccoli - Contributors: Raphael Van Hoffelen -*/ - -#ifndef VOLTAGE_SUPERPOSITION_CLIENT_HPP_ -#define VOLTAGE_SUPERPOSITION_CLIENT_HPP_ - -#include "client_communication.hpp" - -const uint8_t kTypeVoltageSuperposition = 74; - -class VoltageSuperPositionClient: public ClientAbstract{ - public: - VoltageSuperPositionClient(uint8_t obj_idn): - ClientAbstract( kTypeVoltageSuperposition, obj_idn), - zero_angle_( kTypeVoltageSuperposition, obj_idn, kSubZeroAngle), - frequency_( kTypeVoltageSuperposition, obj_idn, kSubFrequency), - phase_( kTypeVoltageSuperposition, obj_idn, kSubPhase), - amplitude_( kTypeVoltageSuperposition, obj_idn, kSubAmplitude), - voltage_( kTypeVoltageSuperposition, obj_idn, kSubVoltage) - {}; - - // Client Entries - ClientEntry zero_angle_; - ClientEntry frequency_; - ClientEntry phase_; - ClientEntry amplitude_; - ClientEntry voltage_; - - void ReadMsg(uint8_t* rx_data, uint8_t rx_length) - { - static const uint8_t kEntryLength = kSubVoltage+1; - ClientEntryAbstract* entry_array[kEntryLength] = { - &zero_angle_, // 0 - &frequency_, // 1 - &phase_, // 2 - &litude_, // 3 - &voltage_, // 4 - }; - - ParseMsg(rx_data, rx_length, entry_array, kEntryLength); - } - - private: - static const uint8_t kSubZeroAngle = 0; - static const uint8_t kSubFrequency = 1; - static const uint8_t kSubPhase = 2; - static const uint8_t kSubAmplitude = 3; - static const uint8_t kSubVoltage = 4; -}; - -#endif // VOLTAGE_SUPERPOSITION_CLIENT_HPP_ \ No newline at end of file diff --git a/src/generic_interface.cpp b/src/generic_interface.cpp index 6c8d62b..13c65ac 100644 --- a/src/generic_interface.cpp +++ b/src/generic_interface.cpp @@ -18,7 +18,7 @@ */ /* - Name: generic_interface.c + Name: generic_interface.cpp Last update: 3/7/2019 by Raphael Van Hoffelen Author: Matthew Piccoli Contributors: Raphael Van Hoffelen