Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: incorrect failure name was being used for 0x2311 #89

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/jsd_egd.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,8 @@ char* jsd_egd_fault_code_to_string(jsd_egd_fault_code_t fault_code) {
case JSD_EGD_FAULT_RESERVED:
return "JSD_EGD_FAULT_RESERVED";
break;
case JSD_EGD_FAULT_OVER_CURRENT:
return "JSD_EGD_FAULT_OVER_CURRENT";
case JSD_EGD_FAULT_SERIAL_FEEDBACK_ERROR:
return "JSD_EGD_FAULT_SERIAL_FEEDBACK_ERROR";
break;
case JSD_EGD_FAULT_SHORT_CIRCUIT:
return "JSD_EGD_FAULT_SHORT_CIRCUIT";
Expand Down Expand Up @@ -1581,7 +1581,7 @@ jsd_egd_fault_code_t jsd_egd_get_fault_code_from_ec_error(ec_errort error) {
return JSD_EGD_FAULT_RESERVED;
break;
case 0x2311:
return JSD_EGD_FAULT_OVER_CURRENT;
return JSD_EGD_FAULT_SERIAL_FEEDBACK_ERROR;
break;
case 0x2340:
return JSD_EGD_FAULT_SHORT_CIRCUIT;
Expand Down
2 changes: 1 addition & 1 deletion src/jsd_egd_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ typedef enum {
typedef enum {
JSD_EGD_FAULT_OKAY = 0,
JSD_EGD_FAULT_RESERVED,
JSD_EGD_FAULT_OVER_CURRENT,
JSD_EGD_FAULT_SERIAL_FEEDBACK_ERROR,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the latest version of EAS 0x2311 shows "Sensor Feedback Error" as the name, not necessarily a serial feedback. I think we should rename the label to JSD_EGD_FAULT_SENSOR_FEEDBACK_ERROR.

JSD_EGD_FAULT_SHORT_CIRCUIT,
JSD_EGD_FAULT_UNDER_VOLTAGE,
JSD_EGD_FAULT_LOSS_OF_PHASE,
Expand Down