Skip to content

Commit

Permalink
Correct energy level algorithm parameters (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
brunoeiterer committed Aug 9, 2017
1 parent 6c640a3 commit 1b252d8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion firmware/WRITE_ACCUMULATED_CURRENT/fsat_eps.map
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
******************************************************************************
MSP430 Linker PC v4.4.3
******************************************************************************
>> Linked Tue Aug 08 19:45:50 2017
>> Linked Wed Aug 09 13:38:27 2017

OUTPUT FILE NAME: <fsat_eps.out>
ENTRY POINT SYMBOL: "_c_int00_noargs_noexit" address: 00008734
Expand Down
2 changes: 1 addition & 1 deletion firmware/WRITE_ACCUMULATED_CURRENT/fsat_eps_linkInfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<link_info>
<banner>MSP430 Linker PC v4.4.3</banner>
<copyright>Copyright (c) 2003-2015 Texas Instruments Incorporated</copyright>
<link_time>0x598a3f1e</link_time>
<link_time>0x598b3a83</link_time>
<link_errors>0x0</link_errors>
<output_file>fsat_eps.out</output_file>
<entry_point>
Expand Down
4 changes: 2 additions & 2 deletions firmware/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ __interrupt void timer0_a0_isr(void){

watchdog_reset_counter();

EPS_data[eps_status] = energyLevelAlgorithm(EPS_data[eps_status], battery_accumulated_current_LSB | (battery_accumulated_current_MSB << 8));
EPS_data[eps_status] = energyLevelAlgorithm(EPS_data[eps_status], EPS_data[battery_accumulated_current_LSB] | (EPS_data[battery_accumulated_current_MSB] << 8));

watchdog_reset_counter();

Expand Down Expand Up @@ -292,7 +292,7 @@ __interrupt void timer0_a0_isr(void){
float_send(current_unit*((EPS_data[32] << 8) + EPS_data[31]));
uart_tx_debug("\r\n");
uart_tx_debug("Battery Accumulated Current: ");
float_send(accumulated_current_unit*((EPS_data[42] << 8) + EPS_data[41]));
float_send((accumulated_current_unit)*((EPS_data[37] << 8) + EPS_data[36]));
uart_tx_debug("\r\n");
sprintf(protection_register_string, "%#04x", EPS_data[43] & 0x0f);
uart_tx_debug("Protection Register: ");
Expand Down

0 comments on commit 1b252d8

Please sign in to comment.