added Variablehandler for Temp

This commit is contained in:
2021-12-15 13:57:58 +01:00
parent de0ddf839a
commit 4ab90de28a
11 changed files with 49 additions and 174 deletions

View File

@ -94,6 +94,14 @@ LOCAL CONST VARH_StVarInfo m_astVarInfo[VARH_eNumberOfVariables] =
{ VARH_FLAG_READONLY | VARH_FLAG_FLOAT, (VARH_UVariable)0.0f, (VARH_UVariable)-60.0f, (VARH_UVariable)100.0f }, // VARH_eTemp_C,
{ VARH_FLAG_READONLY | VARH_FLAG_FLOAT, (VARH_UVariable)0.0f, (VARH_UVariable)-50.0f, (VARH_UVariable)70.0f }, // VARH_eTemp_Diff,
{ VARH_FLAG_READONLY | VARH_FLAG_FLOAT, (VARH_UVariable)0.0f, (VARH_UVariable)-50.0f, (VARH_UVariable)70.0f }, // VARH_ePeltier_U,
{ VARH_FLAG_READONLY | VARH_FLAG_FLOAT, (VARH_UVariable)0.0f, (VARH_UVariable)-10.0f, (VARH_UVariable)10.0f }, // VARH_ePeltier_I,
{ VARH_FLAG_READONLY | VARH_FLAG_FLOAT, (VARH_UVariable)0.0f, (VARH_UVariable)0.0f, (VARH_UVariable)5.0f }, // VARH_ePeltier_R,
{ VARH_FLAG_READONLY | VARH_FLAG_FLOAT, (VARH_UVariable)0.0f, (VARH_UVariable)-50.0f, (VARH_UVariable)150.0f }, // VARH_ePeltier_P,
{ VARH_FLAG_READONLY | VARH_FLAG_FLOAT, (VARH_UVariable)0.0f, (VARH_UVariable)20.0f, (VARH_UVariable)30.0f }, // VARH_eSupply_U,
{ VARH_FLAG_READONLY | VARH_FLAG_FLOAT, (VARH_UVariable)0.0f, (VARH_UVariable)0.0f, (VARH_UVariable)5.0f }, // VARH_eSupply_I,
{ VARH_FLAG_READONLY | VARH_FLAG_FLOAT, (VARH_UVariable)0.0f, (VARH_UVariable)0.0f, (VARH_UVariable)150.0f }, // VARH_eSupply_P,
};
@ -247,23 +255,6 @@ VARH_UVariable VARH_uGetVariableData( U8 u8Variable )
return( uVar );
}
//-------------------------------------------------------------------------------------------------
// Function: VARH_u32GetVariableDataFromMaster
// Description: Gets the Variable Data from Master Protocol
// Only use this function from Master interpreter
// Parameters: U8 u8Variable
// Returns: VARH_UVariable
//-------------------------------------------------------------------------------------------------
VARH_UVariable VARH_u32GetVariableDataFromMaster( U8 u8Variable )
{
osMutexAcquire( m_pstMutexID, osWaitForever ); // aquire mutex
VARH_UVariable uVar = m_auVariable[u8Variable];
osMutexRelease( m_pstMutexID ); // release mutex
return( uVar );
}
//-------------------------------------------------------------------------------------------------
// Function: VARH_vSetVariableToInitData
// Description: Sets the variable to its initial data