Index: firmware/App/Controllers/LoadCell.c =================================================================== diff -u -r2c70c24f7c5ead2322ec56f740277f0654ad281a -rd4f40c48a728c866c24bf44a59ff8ddd1e244ca1 --- firmware/App/Controllers/LoadCell.c (.../LoadCell.c) (revision 2c70c24f7c5ead2322ec56f740277f0654ad281a) +++ firmware/App/Controllers/LoadCell.c (.../LoadCell.c) (revision d4f40c48a728c866c24bf44a59ff8ddd1e244ca1) @@ -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: none + * @details Outputs: loadcells[] + * @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