Files
hsb/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/hsb-mrts/src/CalibrationSetpoints.c
mmi 1bbfa1c7f3 Added calibration setpoints
git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@417 05563f52-14a8-4384-a975-3d1654cca0fa
2018-01-11 13:55:17 +00:00

101 lines
3.5 KiB
C

// -----------------------------------------------------------------------------
/// @file CalibrationSetpoints.c
/// @brief Description
// -----------------------------------------------------------------------------
// Micro-Key bv
// Industrieweg 28, 9804 TG Noordhorn
// Postbus 92, 9800 AB Zuidhorn
// The Netherlands
// Tel: +31 594 503020
// Fax: +31 594 505825
// Email: support@microkey.nl
// Web: www.microkey.nl
// -----------------------------------------------------------------------------
/// $Revision$
/// $Author$
/// $Date$
// (c) 2018 Micro-Key bv
// -----------------------------------------------------------------------------
/// @file CalibrationSetpoints.c
/// @ingroup {group_name}
// -----------------------------------------------------------------------------
// Include files
// -----------------------------------------------------------------------------
#include "CalibrationSetpoints.h"
#include "PCBA.h"
// -----------------------------------------------------------------------------
// Constant and macro definitions
// -----------------------------------------------------------------------------
#define CATHODE_LOW (200)
#define CATHODE_HIGH (1000)
#define MCP_LOW (500)
#define MCP_HIGH (2000)
#define TESLA_LOW (3000)
#define TESLA_HIGH (6000)
#define ANODE_LOW (6000)
#define ANODE_HIGH (10000)
// -----------------------------------------------------------------------------
// Type definitions
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// File-scope variables
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// Function declarations
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// Function definitions
// -----------------------------------------------------------------------------
void CalibrationSetpoints_generateDefaultParameters(struct CalibrationSetpoints* self)
{
self->setpoints[CALIBRATION_SETPOINT_CATHODE].low = CATHODE_LOW;
self->setpoints[CALIBRATION_SETPOINT_CATHODE].high = CATHODE_HIGH;
self->setpoints[CALIBRATION_SETPOINT_MCP].low = MCP_LOW;
self->setpoints[CALIBRATION_SETPOINT_MCP].high = MCP_HIGH;
self->setpoints[CALIBRATION_SETPOINT_TESLA].low = TESLA_LOW;
self->setpoints[CALIBRATION_SETPOINT_TESLA].high = TESLA_HIGH;
self->setpoints[CALIBRATION_SETPOINT_ANODE].low = ANODE_LOW;
self->setpoints[CALIBRATION_SETPOINT_ANODE].high = ANODE_HIGH;
}
struct CalibrationSetpoint* CalibrationSetpoints_getSetpoint(struct CalibrationSetpoints* self, enum CALIBRATION_SETPOINT_ID setpointIdentifier)
{
return &self->setpoints[setpointIdentifier];
}
void CalibrationSetpoints_setActiveSetpointSet(struct CalibrationSetpoints* self, enum CALIBRATION_SETPOINT_ID setpointIdentifier)
{
self->currentActiveSetpointSet = setpointIdentifier;
}
struct CalibrationSetpoint* CalibrationSetpoints_getActiveSetpointSet(struct CalibrationSetpoints* self)
{
return &self->setpoints[self->currentActiveSetpointSet];
}