Index: firmware/App/Controllers/LoadCell.c =================================================================== diff -u -rb135150a91ea70889433dd23420fdbe91745fc91 -rd1a2620817a1147edbeceb96de37bbbdfb5ff079 --- firmware/App/Controllers/LoadCell.c (.../LoadCell.c) (revision b135150a91ea70889433dd23420fdbe91745fc91) +++ firmware/App/Controllers/LoadCell.c (.../LoadCell.c) (revision d1a2620817a1147edbeceb96de37bbbdfb5ff079) @@ -23,6 +23,12 @@ static F32 Load_cell_a2_ave; static F32 Load_cell_b1_ave; static F32 Load_cell_b2_ave; + +DATA_DECL( U32, MeasuredLoadCellA1, loadCellA1raw, 0.0, 0.0 );// measured load cell A1 raw +DATA_DECL( U32, MeasuredLoadCellA2, loadCellA2raw, 0.0, 0.0 );// measured load cell A2 raw +DATA_DECL( U32, MeasuredLoadCellB1, loadCellB1raw, 0.0, 0.0 );// measured load cell B1 raw +DATA_DECL( U32, MeasuredLoadCellB2, loadCellB2raw, 0.0, 0.0 );// measured load cell B2 raw + /**@}*/ /*********************************************************************//** @@ -45,11 +51,21 @@ static U32 Load_cell_b2 = 0; BOOL result; - Load_cell_a1 += getFPGALoadCellA1(); // No overflow since ADC output is 24 bits. - Load_cell_a2 += getFPGALoadCellA2(); - Load_cell_b1 += getFPGALoadCellB1(); - Load_cell_b2 += getFPGALoadCellB2(); + //Load_cell_a1 += getFPGALoadCellA1(); // No overflow since ADC output is 24 bits. + //Load_cell_a2 += getFPGALoadCellA2(); + //Load_cell_b1 += getFPGALoadCellB1(); + //Load_cell_b2 += getFPGALoadCellB2(); + loadCellA1raw.data = getFPGALoadCellA1(); + loadCellA2raw.data = getFPGALoadCellA2(); + loadCellB1raw.data = getFPGALoadCellB1(); + loadCellB2raw.data = getFPGALoadCellB2(); + + Load_cell_a1 += getLoadCellA1raw(); + Load_cell_a2 += getLoadCellA2raw(); + Load_cell_b1 += getLoadCellB1raw(); + Load_cell_b2 += getLoadCellB2raw(); + Counter++; if (Counter == LOAD_CELL_REPORT_PERIOD) { @@ -161,7 +177,6 @@ *************************************************************************/ DATA_GET( U32, getLoadCellA1raw, loadCellA1raw ) - /************************************************************************* * @brief getLoadCellA2raw * The getLoadCellA2raw function gets the measured load cell A2 \n Index: firmware/App/Controllers/LoadCell.h =================================================================== diff -u -rb64c49fdcf2b6d95e61e63f8e258c4e600935bbd -rd1a2620817a1147edbeceb96de37bbbdfb5ff079 --- firmware/App/Controllers/LoadCell.h (.../LoadCell.h) (revision b64c49fdcf2b6d95e61e63f8e258c4e600935bbd) +++ firmware/App/Controllers/LoadCell.h (.../LoadCell.h) (revision d1a2620817a1147edbeceb96de37bbbdfb5ff079) @@ -30,4 +30,9 @@ F32 getLoadCellB1Ave(void); F32 getLoadCellB2Ave(void); +DATA_GET_PROTOTYPE( U32, getLoadCellA1raw ); +DATA_GET_PROTOTYPE( U32, getLoadCellA2raw ); +DATA_GET_PROTOTYPE( U32, getLoadCellB1raw ); +DATA_GET_PROTOTYPE( U32, getLoadCellB2raw ); + #endif /* APP_CONTROLLERS_LOADCELL_H_ */