Elite 1.4-re gptimer test

This commit is contained in:
alan
2019-09-26 18:05:28 +08:00
parent b69e9017bf
commit b65ff2383a
3 changed files with 5 additions and 3 deletions
@@ -40,7 +40,6 @@ typedef struct _CURRENT_USER_CODE {
static CURRENT_USER_CODE CurrentUserCode;
static int32_t CCModeReadCurrent(CURRENT_USER_CODE *CurrentUserCode){
int32_t Real_Current = 0;
CCModeReset = 0; // This flag will control DAC working
@@ -607,7 +607,7 @@ static int32_t DAC_to_realV(uint16_t DACcode);
#define DAC_NEG_MAX 0xFFFF
static uint16_t DACUserCode = 0x0000;
static uint16_t SampleRateTable[6] = {1, 10, 100, 500, 1000, 10000}; // 1 =>100 Hz, 10000=>0.01 Hz
static uint32_t SampleRateTable[6] = {10, 100, 1000, 5000, 10000, 100000}; // 1 =>100 Hz, 10000=>0.01 Hz
static uint16_t SampleRate_counter = 1;
// record value for IV curve to calculate average current
@@ -859,7 +859,6 @@ static void update_ZM_instruction(uint8 *ins) {
CleanBuffer();
INSTRUCTION.eliteFxn = IT_CURVE;
// IT_Plot(); // enable 10v = 1
break;
}
case SET_SAMPLE_RATE: {
@@ -140,6 +140,10 @@ static void EliteDACControl() {
DAC_outputV(Usercode_Correction_to_DAC(INSTRUCTION.VoltConstant));
}
}
else if(INSTRUCTION.ResisterMeter == CONSTANT_CURRENT){
DAC_outputV(Usercode_Correction_to_DAC(CurrentUserCode.value));
}
else{
// IT, VT need only ADC measure
return;