Index: firmware/App/Controllers/LoadCell.c =================================================================== diff -u -r30bf93016955d5eb5c4053645d5b2065f20be911 -re58e3385eaf5e920335f963937b2e9f654a32cfe --- firmware/App/Controllers/LoadCell.c (.../LoadCell.c) (revision 30bf93016955d5eb5c4053645d5b2065f20be911) +++ firmware/App/Controllers/LoadCell.c (.../LoadCell.c) (revision e58e3385eaf5e920335f963937b2e9f654a32cfe) @@ -505,6 +505,46 @@ /*********************************************************************//** * @brief + * The getLoadCellsTareValues function gets the load cells tare values + * @details Inputs: loadcells[] + * @details Outputs: none + * @param bufferAddress address to the buffer provided to get the load cells + * tare values + * @return none + *************************************************************************/ +void getLoadCellsTareValues( U08* bufferAddress ) +{ + LOAD_CELL_ID_T id; + + for ( id = LOAD_CELL_FIRST; id < NUM_OF_LOAD_CELLS; ++id ) + { + memcpy( bufferAddress, &loadcells[ id ].autoCalOffset, sizeof( F32 ) ); + bufferAddress += sizeof( F32 ); + } +} + +/*********************************************************************//** + * @brief + * The setLoadCellsTareValues function sets the load cells tare values + * @details Inputs: loadcells[] + * @details Outputs: none + * @param bufferAddress address to the buffer provided to set the load cells + * tare values + * @return none + *************************************************************************/ +void setLoadCellsTareValues( U08* bufferAddress ) +{ + LOAD_CELL_ID_T id; + + for ( id = LOAD_CELL_FIRST; id < NUM_OF_LOAD_CELLS; ++id ) + { + memcpy( &loadcells[ id ].autoCalOffset, bufferAddress, sizeof( F32 ) ); + bufferAddress += sizeof( F32 ); + } +} + +/*********************************************************************//** + * @brief * The monitorLoadCellsPrimaryBackupDriftOutOfRange function monitors the * load cells' primary and backup drift. * @details Inputs: none