Old fashion design for PC-104
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.1 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Laser Guard Ltd.
  3. // Copyright � 2000-2002. All Rights Reserved.
  4. // Version 1.0 01/01/2000
  5. // Last modification: 08/10/2003
  6. // PROJECT:
  7. // SUBSYSTEM:
  8. // FILE: voltage_.cpp
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Source file of voltage_.cpp
  13. //----------------------------------------------------------------------------
  14. #include "Voltage.h"
  15. CVoltage::CVoltage()
  16. {
  17. memset( &m_VoltageParameters, 0, sizeof( m_VoltageParameters ) );
  18. m_bBoardVoltage = TRUE;
  19. m_bBoardVoltageChanged = TRUE;
  20. m_nBoardVoltageValue = 0;
  21. }
  22. CVoltage::~CVoltage()
  23. {
  24. Destroy();
  25. }
  26. BOOL CVoltage::Create( LGS::PVOLTAGE_PARAMETERS pParameters )
  27. {
  28. Destroy();
  29. if( !pParameters )
  30. return FALSE;
  31. // store parameters
  32. m_VoltageParameters = *pParameters;
  33. return TRUE;
  34. }
  35. void CVoltage::Destroy()
  36. {
  37. // reset prameters
  38. memset( &m_VoltageParameters, 0, sizeof( m_VoltageParameters ) );
  39. m_bBoardVoltage = TRUE;
  40. m_bBoardVoltageChanged = TRUE;
  41. m_nBoardVoltageValue = 0;
  42. }