📄 alamc.lst
字号:
174 }
175 else
176 if(ala[2][i]>0)//与室温相差过大
177 {
178 if(ala[2][i]>10)ala[2][i]=10;
179 --ala[2][i];
180 }
181
182
183 if(V<=S&&(Q<0xff))
184 {
185 if(ala[3][i]<C_RF_MAX_COUNT)ala[3][i]++;
186 }
187 else
188 if(ala[3][i]>0)//电压过低
189 {
190 if(ala[3][i]>10)ala[3][i]=10;
191 --ala[3][i];
192 }
193
194 }
195 for(i=0,m=1;i<C_RF_MAX_COUNT;++i)
196 {
197 if(ala[0][i]>=C_RF_MAX_COUNT)
198 {
199 B->_AlamcFaultTem|=m;
200 }
201 else if(ala[0][i]==0)B->_AlamcFaultTem&=(~m);
202 if(ala[1][i]>=C_RF_MAX_COUNT)
203 {
204 B->_AlamcOverTem|=m;
205 }
206 else if(ala[1][i]==0)B->_AlamcOverTem&=(~m);
207 if(ala[2][i]>=C_RF_MAX_COUNT)
208 {
209 B->_AlamcRoomTem|=m;
210 }
211 else if(ala[2][i]==0)B->_AlamcRoomTem&=(~m);
212
213 if(ala[3][i]>=C_RF_MAX_COUNT)
214 {
215 B->_AlamcLowVol|=m;
216 }
217 else if(ala[3][i]==0)B->_AlamcLowVol&=(~m);
218
219 m<<=1;
220 }
221 if((B->_AlamcFaultTem!=0)||(B->_AlamcOverTem!=0)||(B->_AlamcRoomTem!=0)||(B->_AlamcLowVol!=0)||(B->_AlamcFastTem!=0))
222 Set_bit(GPIOC->ODR,0);
223 else Clr_bit(GPIOC->ODR,0);
224 if(B->_AlamcFaultTem!=0)Set_bit(GPIOC->ODR,10);
225 else Clr_bit(GPIOC->ODR,10);
226 if((B->_AlamcOverTem!=0)||(B->_AlamcRoomTem!=0)||(B->_AlamcFastTem!=0))Set_bit(GPIOA->ODR,2);
227 else Clr_bit(GPIOA->ODR,2);
228 }
229 //////////////////////////////////////
230 //NOTS_Store(&History,_yt._Xorder,gSampleFlag,&_yt.sensor);
231 Int16U NOTS_Store(NOTS *DATA,Int8U Flag,SensorRF *pos)
232 {
233 static Int32U TimerCount=288-60;
234 Int16U a,b,c;
235 if(Flag==C_Refurbish)//重分配了时钟
236 {
237 TimerCount=0;
238 DATA->SpaceCount=0;
239 (++DATA)->SpaceCount=0;
240 (++DATA)->SpaceCount=0;
241 (++DATA)->SpaceCount=0;
242 }
243 b=288;//288 sec时间60 ;//
244
245 if(Flag==C_Refurbish||++TimerCount>=b)
246 {
247 TimerCount=0;
248 for(c=0;c<4;c++)
249 {
250 if(DATA->SpaceCount>=(C_STORE_BAR-1))
251 {
252 for(a=0;a<(C_STORE_BAR-1);a++)
253 {
254 b=DATA->ATemper[a+1];
255 DATA->ATemper[a]=b;
256 b=DATA->BTemper[a+1];
257 DATA->BTemper[a]=b;
258 b=DATA->CTemper[a+1];
259 DATA->CTemper[a]=b;
260 }
261 b=pos->ATem;
262 DATA->ATemper[C_STORE_BAR-1]=b;
263 b=pos->BTem;
264 DATA->BTemper[C_STORE_BAR-1]=b;
265 b=pos->CTem;
266 DATA->CTemper[C_STORE_BAR-1]=b;
267
268 }else
269 {
270 for(a=0;a<C_RF_MAX_COUNT;a++)
271 {
272 DATA->ATemper[DATA->SpaceCount]=pos->ATem;
273 DATA->BTemper[DATA->SpaceCount]=pos->BTem;
274 DATA->CTemper[DATA->SpaceCount]=pos->CTem;
275 }
276 DATA->SpaceCount++;
277 }
278 DATA->B_DISP=1;
279 DATA++,pos++;
280 }
281 }
282 return 0;
283 }
284 /////////////////////////
285 void CHK_BELL(Int16U *pos,Int16U a)
286 {
287 static Int16U B_COUNTER;
288 if(a==0)
289 {
290 BELL_OFF;
291 }else
292 {
293 if(*pos!=0)
294 {
295 if(++B_COUNTER>=50)B_COUNTER=0;
296 if(B_COUNTER==0||B_COUNTER==2||B_COUNTER==4||B_COUNTER==6)BELL_ON;
297 else BELL_OFF;
298 }
299 else
300 if(*++pos!=0)
301 {
302 if(++B_COUNTER>=50)B_COUNTER=0;
303 if(B_COUNTER==0)BELL_ON;
304 else BELL_OFF;
305 }
306 else
307 if(*++pos!=0)
308 {
309 if(++B_COUNTER>=50)B_COUNTER=0;
310 if(B_COUNTER==0||B_COUNTER==2)BELL_ON;
311 else BELL_OFF;
312 }
313 else
314 if(*++pos!=0)
315 {
316 if(++B_COUNTER>=50)B_COUNTER=0;
317 if(B_COUNTER==0||B_COUNTER==2||B_COUNTER==4)BELL_ON;
318 else BELL_OFF;
319 }
320 else
321 BELL_OFF;
322 }
323 }
324
325
326
327
328
329
Maximum stack usage in bytes:
Function .cstack
-------- -------
ALAMCREGISTER 32
AlamcFault 32
CHK_BELL 0
Fast_TEM_NOTS 32
NOTS_Store 16
Section sizes:
Function/Label Bytes
-------------- -----
ALA_TEM_TAB 32
ALAMCREGISTER 272
a_buf 2
Fast_TEM_NOTS 796
FTimer 2
sw 2
FNOT 120
B_start 1
AlamcFault 904
ala 64
NOTS_Store 268
TimerCount 4
CHK_BELL 356
B_COUNTER 2
193 bytes in section .bss
4 bytes in section .data
32 bytes in section .rodata
2 596 bytes in section .text
2 596 bytes of CODE memory
32 bytes of CONST memory
197 bytes of DATA memory
Errors: none
Warnings: 2
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -