Skip to content

Commit

Permalink
Addding comment
Browse files Browse the repository at this point in the history
  • Loading branch information
preston-rogers committed Sep 11, 2024
1 parent 731068c commit 957009c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/jsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ void jsd_write(jsd_t* self) {

// Write EtherCat frame to slaves, with logic for smart prints
int transmitted = ecx_send_overlap_processdata(&self->ecx_context);
WARNING("\nSENDING THE OVERLAP PROCESSDATA!!!\n");
// WARNING("\nSENDING THE OVERLAP PROCESSDATA!!!\n");
static int last_transmitted = 1;
if (transmitted <= 0 && last_transmitted != transmitted) {
WARNING("ecx_send_overlap_processdata is not transmitting");
Expand Down
10 changes: 10 additions & 0 deletions src/jsd_epd_nominal.c
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,16 @@ void jsd_epd_nominal_update_state_from_PDO_data(jsd_t* self,
state->pub.in_motion = state->txpdo.status_register_1 >> 23 & 0x01;
state->pub.hall_state = state->txpdo.status_register_2 >> 0 & 0x07;

WARNING("\n We got STO Engaged! Here's the SW:\n");
unsigned int statusword_uint = (unsigned int)self->slave_states[slave_id].epd_nominal.txpdo.statusword;
WARNING("Bits of txpdo statusword:\n");
for(long unsigned int bit=0;bit<(sizeof(unsigned int) * 8); bit++)
{
WARNING("%i ", statusword_uint & 0x01);
statusword_uint = statusword_uint >> 1;
}
WARNING("\n");

// TODO(dloret): EGD code prints change in sto_engaged here.

// Digital inputs
Expand Down

0 comments on commit 957009c

Please sign in to comment.