Переглянути джерело

控温过程中,可调整温度

yidong 2 тижнів тому
батько
коміт
425f38d02b

+ 2 - 2
DriverInterface/state_mini.c

@@ -94,9 +94,9 @@ void DatascopeSend(int number,float value1,float value2, float value3, float val
 	*(uint32_t*)&DataScopeOutPutBuffer[36] = *(uint32_t*)&value9;
 	*(uint32_t*)&DataScopeOutPutBuffer[40] = *(uint32_t*)&value10;
 	*(uint32_t*)&DataScopeOutPutBuffer[44] = *(uint32_t*)&value11;	//时间
-	temp = get_max_min((float*)DataScopeOutPutBuffer);
+	temp = get_max_min((float*)(DataScopeOutPutBuffer+4));
 	*(uint32_t*)&DataScopeOutPutBuffer[48] = *(uint32_t*)&temp;	//极差
-	temp = get_std_avg((float*)DataScopeOutPutBuffer);
+	temp = get_std_avg((float*)(DataScopeOutPutBuffer+4));
 	*(uint32_t*)&DataScopeOutPutBuffer[52] = *(uint32_t*)&temp;	//离散系数
     SendCount=56;
     DataScopeOutPutBuffer[SendCount] = ckeck_sum(DataScopeOutPutBuffer, SendCount);

+ 2 - 1
DriverInterface/user_heater.c

@@ -215,7 +215,8 @@ void heater_work(heat_ctrl_def *heater)
                     heater->targetAfterAdj = heater->adJTarget + heater->SetTempVal;
             }else{                                         
                     heater->targetAfterAdj =heater->SetTempVal;
-                }     
+                }  
+            heater->pid.goal = heater->targetAfterAdj ;   
             PIDRealize(&heater->pid);
             com_pwm_Set(heater->pwdId,heater->pid.variate);
             if(heater->timenum>=20)

+ 1 - 34
MDK-ARM/mini7_V2.uvoptx

@@ -148,40 +148,7 @@
           <Name>-U-O142 -O2254 -SF4000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP") -D00(1BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC800 -FN1 -FF0STM32F10x_512.FLM -FS08000000 -FL080000 -FP0($$Device:STM32F103RE$Flash\STM32F10x_512.FLM)</Name>
         </SetRegEntry>
       </TargetDriverDllRegistry>
-      <Breakpoint>
-        <Bp>
-          <Number>0</Number>
-          <Type>0</Type>
-          <LineNumber>218</LineNumber>
-          <EnabledFlag>1</EnabledFlag>
-          <Address>134335292</Address>
-          <ByteObject>0</ByteObject>
-          <HtxType>0</HtxType>
-          <ManyObjects>0</ManyObjects>
-          <SizeOfObject>0</SizeOfObject>
-          <BreakByAccess>0</BreakByAccess>
-          <BreakIfRCount>1</BreakIfRCount>
-          <Filename>..\DriverInterface\ws2812.c</Filename>
-          <ExecCommand></ExecCommand>
-          <Expression>\\mini7_V2\../DriverInterface/ws2812.c\218</Expression>
-        </Bp>
-        <Bp>
-          <Number>1</Number>
-          <Type>0</Type>
-          <LineNumber>184</LineNumber>
-          <EnabledFlag>1</EnabledFlag>
-          <Address>134335074</Address>
-          <ByteObject>0</ByteObject>
-          <HtxType>0</HtxType>
-          <ManyObjects>0</ManyObjects>
-          <SizeOfObject>0</SizeOfObject>
-          <BreakByAccess>0</BreakByAccess>
-          <BreakIfRCount>1</BreakIfRCount>
-          <Filename>..\DriverInterface\ws2812.c</Filename>
-          <ExecCommand></ExecCommand>
-          <Expression>\\mini7_V2\../DriverInterface/ws2812.c\184</Expression>
-        </Bp>
-      </Breakpoint>
+      <Breakpoint/>
       <WatchWindow1>
         <Ww>
           <count>0</count>