C
#define RdiaIncVal(pDia) RdiaSetVal(pDia, (pDia->val + pDia->res))
Overview
Used to directly increment the value. The delta change used is the resolution setting (res).
Input Parameters
Input Parameters |
Description |
pDia |
Pointer to the object. |
Returns
none
Preconditions
none
Side Effects
none
Example
WORD updatedVal, prevVal; ROUNDDIAL *pDia; // assuming pDia is initialized to an existing dial Object // assume GetInput() is a function that retrieves source data prevVal = RdiaGetVal(pDia); updatedVal = GetInput(); if (updatedVal > prevVal) RdiaIncVal(pDia); if (updatedVal < prevVal) RdiaDecVal(pDia);