Elite 1.4-re IT fix display output V
This commit is contained in:
+1
-1
@@ -85,7 +85,7 @@ static int32_t DAC_to_realV(uint16_t DACcode)
|
||||
volt_32 = DACcode;
|
||||
// RealV = (volt_32 - offset) / coeff;
|
||||
RealV = (-1896) * volt_32 + offset;
|
||||
RealV = RealV / 10e4; //(mV)
|
||||
RealV = RealV / 10e3; //(mV)
|
||||
|
||||
return RealV;
|
||||
}
|
||||
|
||||
+14
-7
@@ -945,18 +945,21 @@ static void SendNotify(){
|
||||
SimpleProfile_SetParameter(BLE_DAT_BUFF_CHAR, BLE_DAT_BUFF_SIZE, not_buf);
|
||||
}
|
||||
|
||||
// "va": "(VOLT_ORIGIN + 1) * 0x0010",
|
||||
// "vb": "(VOLT_FINAL + 1) * 0x0010",
|
||||
//
|
||||
// Old DAC output form
|
||||
// Vorigin & Vfinal range : 0~49
|
||||
// "va": "(VOLT_ORIGIN + 1) * 0x0010",
|
||||
// "vb": "(VOLT_FINAL + 1) * 0x0010",
|
||||
static uint16_t OldDAC2UserCode(uint16_t OldDAC){
|
||||
uint16_t UserCode = 0;
|
||||
UserCode = (OldDAC / 0x0010) *1000;
|
||||
return UserCode;
|
||||
}
|
||||
|
||||
// Old step output form
|
||||
// VOLT_STEP * 0x40
|
||||
static uint8_t OldStep2NewStep(uint8_t OldStep){
|
||||
uint8_t NewStep = 0;
|
||||
NewStep = (OldStep / 0x12) * 0x9E;
|
||||
NewStep = (OldStep / 0x40) * 0x9E;
|
||||
return NewStep;
|
||||
}
|
||||
|
||||
@@ -965,13 +968,17 @@ static uint8_t OldStep2NewStepTime(uint8_t StepTime){
|
||||
case 0:{
|
||||
return 0x02;
|
||||
}
|
||||
case 1:{
|
||||
case 0x12:{
|
||||
return 0x05;
|
||||
}
|
||||
case 2:{
|
||||
|
||||
// 0x12 * 2 =
|
||||
case 0x24 :{
|
||||
return 0x06;
|
||||
}
|
||||
case 3:{
|
||||
|
||||
// 0x12 *3
|
||||
case 0x36 :{
|
||||
return 0x09;
|
||||
}
|
||||
default:{
|
||||
|
||||
Reference in New Issue
Block a user