test
This commit is contained in:
+3
-3
@@ -1296,9 +1296,9 @@ static int32_t DAC_to_realV(uint16_t DACcode)
|
||||
|
||||
usercode_32 = ((DACcode * 1e7) - Correction.Usercode2DAC.offset) / Correction.Usercode2DAC.coeff;
|
||||
|
||||
// RealV = (int32_t) (usercode_32 / 5) - 5000;
|
||||
RealV = (int32_t) usercode_32;
|
||||
// return mV
|
||||
RealV = (int32_t) ((usercode_32 / 5) - 5000) * 1000;
|
||||
// RealV = (int32_t) usercode_32;
|
||||
// return nV
|
||||
return RealV;
|
||||
}
|
||||
|
||||
|
||||
+7
-5
@@ -41,7 +41,7 @@ static uint16_t OneWayVoltScan(IVMode *IV) {
|
||||
}
|
||||
|
||||
if (CT.StepTimeCounter == IV->_StepTime){
|
||||
if (IV->_VOrigin < IV->_VStop) {
|
||||
if (IV->_VOrigin < IV->_VStop) {//4~5V
|
||||
// output the next output volt
|
||||
INSTRUCTION.VoltConstant = INSTRUCTION.VoltConstant + IV->_Step;
|
||||
// Only used in two-wire IV
|
||||
@@ -99,10 +99,12 @@ static uint16_t OneWayVoltScan(IVMode *IV) {
|
||||
NotifyVolt[2] = (uint8_t)((RealV & 0x0000FF00) >> 8);
|
||||
NotifyVolt[3] = (uint8_t)(RealV & 0x000000FF);
|
||||
|
||||
NotifyImpedance[0] = (uint8_t)((RealV & 0xFF000000) >> 24);
|
||||
NotifyImpedance[1] = (uint8_t)((RealV & 0x00FF0000) >> 16);
|
||||
NotifyImpedance[2] = (uint8_t)((RealV & 0x0000FF00) >> 8);
|
||||
NotifyImpedance[3] = (uint8_t)(RealV & 0x000000FF);
|
||||
|
||||
NotifyImpedance[0] = 0x00;
|
||||
NotifyImpedance[1] = 0x00;
|
||||
NotifyImpedance[2] = (uint8_t)((INSTRUCTION.VoltConstant & 0xFF00) >> 8);
|
||||
NotifyImpedance[3] = (uint8_t)(INSTRUCTION.VoltConstant & 0x00FF);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user