Skip to content

Commit

Permalink
fix: Change bat charge parameter to mirror the accumulated current pa…
Browse files Browse the repository at this point in the history
…rameter
  • Loading branch information
Ramon de Araujo Borba committed Aug 28, 2024
1 parent fd71068 commit 1c71da4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion firmware/app/structs/eps2_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,8 @@ int eps_buffer_read(uint8_t id, uint32_t *value)
*value = eps_data_buff.batteries_accumulated_ma;
break;
case EPS2_PARAM_ID_BAT_CHARGE:
*value = eps_data_buff.batteries_charge_mah;
/* DEPRECATED PARAMETER! Returns the accumulated current value. */
*value = eps_data_buff.batteries_accumulated_ma;
break;
case EPS2_PARAM_ID_BAT_MONITOR_TEMP:
*value = eps_data_buff.bm_temp_kelvin;
Expand Down
4 changes: 2 additions & 2 deletions firmware/app/structs/eps2_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ typedef enum
EPS2_PARAM_ID_BAT_CURRENT = 27,
EPS2_PARAM_ID_BAT_AVERAGE_CURRENT = 28,
EPS2_PARAM_ID_BAT_ACC_CURRENT = 29,
EPS2_PARAM_ID_BAT_CHARGE = 30,
EPS2_PARAM_ID_BAT_CHARGE = 30, /* DEPRECATED PARAMETER! Returns the accumulated current value. */
EPS2_PARAM_ID_BAT_MONITOR_TEMP = 31,
EPS2_PARAM_ID_BAT_MONITOR_STATUS = 32,
EPS2_PARAM_ID_BAT_MONITOR_PROTECT = 33,
Expand Down Expand Up @@ -146,7 +146,7 @@ typedef struct
uint16_t batteries_ma; /**< Batteries current in mA. */
uint16_t batteries_average_ma; /**< Batteries average current in 8 mA measurements. */
uint16_t batteries_accumulated_ma; /**< Batteries accumulated current in mA. */
uint16_t batteries_charge_mah; /**< Batteries charge in mAh. */
uint16_t batteries_charge_mah; /**< Batteries charge in mAh. */ /* DEPRECATED PARAMETER! Returns the accumulated current value. */
uint32_t batteries_rtd0_kelvin; /**< Batteries RTD 0 temperature in kelvin. */
uint32_t batteries_rtd1_kelvin; /**< Batteries RTD 1 temperature in kelvin. */
uint32_t batteries_rtd2_kelvin; /**< Batteries RTD 2 temperature in kelvin. */
Expand Down

0 comments on commit 1c71da4

Please sign in to comment.