Index: firmware/App/Controllers/LoadCell.c =================================================================== diff -u -r3d87e97b9345aec63ca88d741e3bcd548f90422b -r3839f1c5cad3fe04a969622bb621fc50f2182da9 --- firmware/App/Controllers/LoadCell.c (.../LoadCell.c) (revision 3d87e97b9345aec63ca88d741e3bcd548f90422b) +++ firmware/App/Controllers/LoadCell.c (.../LoadCell.c) (revision 3839f1c5cad3fe04a969622bb621fc50f2182da9) @@ -505,49 +505,6 @@ /*********************************************************************//** * @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 ); - - // Set the load cells have been tared already. - hasLoadCellBeenTared[ id ] = TRUE; - } -} - -/*********************************************************************//** - * @brief * The monitorLoadCellsPrimaryBackupDriftOutOfRange function monitors the * load cells' primary and backup drift. * @details Inputs: none @@ -718,4 +675,47 @@ return result; } +/*********************************************************************//** + * @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 ); + + // Set the load cells have been tared already. + hasLoadCellBeenTared[ id ] = TRUE; + } +} + /**@}*/