Skip to content

Commit

Permalink
Merge branch 'master' into davkim-add-el6001
Browse files Browse the repository at this point in the history
  • Loading branch information
davidinkyu-kim committed Apr 4, 2023
2 parents ff69b5e + cc3e2ae commit 10b0d03
Show file tree
Hide file tree
Showing 27 changed files with 2,097 additions and 756 deletions.
6 changes: 5 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ add_custom_target(fcgen
${CMAKE_BINARY_DIR}/fastcat/autogen/fastcat_devices/commander.cc
)

# Build a library regardless of BUILD_TESTS flag
add_library(fastcat STATIC
trap.c
device_base.cc
Expand All @@ -69,6 +70,8 @@ add_library(fastcat STATIC

jsd/actuator.cc
jsd/actuator_fsm_helpers.cc
jsd/egd_actuator.cc
jsd/epd_actuator.cc
jsd/egd.cc
jsd/el3208.cc
jsd/el3602.cc
Expand All @@ -84,7 +87,7 @@ add_library(fastcat STATIC
jsd/jed0200.cc
jsd/ati_fts.cc

jsd/actuator_offline.cc
jsd/egd_actuator_offline.cc
jsd/egd_offline.cc
jsd/el2124_offline.cc
jsd/el4102_offline.cc
Expand All @@ -94,6 +97,7 @@ add_library(fastcat STATIC
jsd/el3104_offline.cc
jsd/el3202_offline.cc
jsd/el3318_offline.cc
jsd/epd_actuator_offline.cc
jsd/ild1900_offline.cc
jsd/jed0101_offline.cc
jsd/jed0200_offline.cc
Expand Down
2 changes: 2 additions & 0 deletions src/device_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Include external then project includes
#include "jsd/jsd_print.h"

fastcat::DeviceBase::~DeviceBase() {}

void fastcat::DeviceBase::RegisterCmdQueue(
std::shared_ptr<std::queue<DeviceCmd>> cmd_queue)
{
Expand Down
1 change: 1 addition & 0 deletions src/device_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ namespace fastcat
class DeviceBase
{
public:
virtual ~DeviceBase();
// Pure virtual methods
virtual bool ConfigFromYaml(YAML::Node node) = 0;
virtual bool Read() = 0;
Expand Down
78 changes: 71 additions & 7 deletions src/fcgen/fastcat_types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ states:
- name: tared_tz
type: double

- name: actuator
- name: egd_actuator
fields:
- name: actual_position
type: double
Expand All @@ -94,10 +94,10 @@ states:
type: double
- name: cmd_max_current
type: double
- name: egd_state_machine_state
- name: elmo_state_machine_state
type: uint32_t
comment: "From jsd_egd_state_machine_state_t"
- name: egd_mode_of_operation
comment: "From jsd_elmo_state_machine_state_t"
- name: elmo_mode_of_operation
type: uint32_t
comment: "From jsd_egd_mode_of_operation_t"
- name: sto_engaged
Expand All @@ -121,13 +121,77 @@ states:
type: double
- name: drive_temperature
type: uint32_t
- name: egd_actual_position
- name: elmo_actual_position
type: int32_t
- name: elmo_cmd_position
type: int32_t
- name: actuator_state_machine_state
type: uint32_t
- name: power
type: double

- name: epd_actuator
fields:
- name: actual_position
type: double
- name: actual_velocity
type: double
- name: actual_current
type: double
- name: faulted
type: bool
- name: cmd_position
type: double
- name: cmd_velocity
type: double
- name: cmd_current
type: double
- name: cmd_prof_velocity
type: double
comment: "Commanded velocity in Position Profiled mode."
- name: cmd_prof_end_velocity
type: double
comment: "Commanded end velocity in Position Profiled mode."
- name: cmd_prof_accel
type: double
comment: "Commanded acceleration/deceleration in Position and Velocity Profiled modes."
- name: cmd_max_current
type: double
- name: elmo_state_machine_state
type: uint32_t
comment: "From jsd_elmo_state_machine_state_t"
- name: elmo_mode_of_operation
type: uint32_t
comment: "From jsd_epd_mode_of_operation_t"
- name: sto_engaged
type: uint8_t
- name: hall_state
type: uint8_t
- name: target_reached
type: uint8_t
- name: setpoint_ack_rise
type: bool
- name: motor_on
type: uint8_t
- name: servo_enabled
type: uint8_t
- name: jsd_fault_code
type: uint32_t
comment: "From jsd_epd_fault_code_t"
- name: fastcat_fault_code
type: uint32_t
- name: emcy_error_code
type: uint16_t
- name: bus_voltage
type: double
- name: drive_temperature
type: double
- name: elmo_actual_position
type: int32_t
- name: egd_cmd_position
- name: elmo_cmd_position
type: int32_t
- name: actuator_state_machine_state
type: uint32_t
comment: "From jsd_egd_State_machine_state_t"
- name: power
type: double

Expand Down
Loading

0 comments on commit 10b0d03

Please sign in to comment.