Commit c4bf7e2c437e6e38c308426ce8e0e24db21a7e64
1 parent
47e7c6c8
mode printf
Showing
2 changed files
with
16 additions
and
0 deletions
calc_gate.c
| @@ -3,6 +3,11 @@ | @@ -3,6 +3,11 @@ | ||
| 3 | #include <math.h> | 3 | #include <math.h> |
| 4 | #include "calc_gate.h" | 4 | #include "calc_gate.h" |
| 5 | 5 | ||
| 6 | +#define WISFARM_DEBUG | ||
| 7 | +#define LOG_TAG "gate.calc" | ||
| 8 | +#include <wisfarm_log.h> | ||
| 9 | + | ||
| 10 | + | ||
| 6 | typedef enum { | 11 | typedef enum { |
| 7 | gate_full_open_with_free_flow = 0, /*A 闸门全开自由流*/ | 12 | gate_full_open_with_free_flow = 0, /*A 闸门全开自由流*/ |
| 8 | gate_full_open_with_submerged_flow, /*B 闸门全开淹没流*/ | 13 | gate_full_open_with_submerged_flow, /*B 闸门全开淹没流*/ |
| @@ -232,6 +237,8 @@ double cal_gate_full_open_with_free_flow(double water_depth_front_of_gate,double | @@ -232,6 +237,8 @@ double cal_gate_full_open_with_free_flow(double water_depth_front_of_gate,double | ||
| 232 | { | 237 | { |
| 233 | double instantaneousFlow; | 238 | double instantaneousFlow; |
| 234 | 239 | ||
| 240 | + LOG_I("gate full open with free flow."); | ||
| 241 | + | ||
| 235 | switch(wingwall){ | 242 | switch(wingwall){ |
| 236 | case warped_wingwall: | 243 | case warped_wingwall: |
| 237 | if(ds == EXIST) | 244 | if(ds == EXIST) |
| @@ -276,6 +283,8 @@ double cal_gate_full_open_with_submerged_flow(double water_depth_front_of_gate,d | @@ -276,6 +283,8 @@ double cal_gate_full_open_with_submerged_flow(double water_depth_front_of_gate,d | ||
| 276 | { | 283 | { |
| 277 | double instantaneousFlow; | 284 | double instantaneousFlow; |
| 278 | 285 | ||
| 286 | + LOG_I("gate full open with submerged flow."); | ||
| 287 | + | ||
| 279 | switch(wingwall){ | 288 | switch(wingwall){ |
| 280 | case warped_wingwall: | 289 | case warped_wingwall: |
| 281 | if(ds == EXIST) | 290 | if(ds == EXIST) |
| @@ -325,6 +334,8 @@ double cal_gate_control_with_free_flow(double water_depth_front_of_gate,double w | @@ -325,6 +334,8 @@ double cal_gate_control_with_free_flow(double water_depth_front_of_gate,double w | ||
| 325 | { | 334 | { |
| 326 | double instantaneousFlow; | 335 | double instantaneousFlow; |
| 327 | 336 | ||
| 337 | + LOG_I("gate control with free flow."); | ||
| 338 | + | ||
| 328 | switch(wingwall){ | 339 | switch(wingwall){ |
| 329 | case warped_wingwall: | 340 | case warped_wingwall: |
| 330 | if(ds == EXIST) | 341 | if(ds == EXIST) |
| @@ -370,6 +381,8 @@ double cal_gate_control_with_submerged_flow(double water_depth_front_of_gate,dou | @@ -370,6 +381,8 @@ double cal_gate_control_with_submerged_flow(double water_depth_front_of_gate,dou | ||
| 370 | { | 381 | { |
| 371 | double instantaneousFlow; | 382 | double instantaneousFlow; |
| 372 | 383 | ||
| 384 | + LOG_I("gate control with submerged flow."); | ||
| 385 | + | ||
| 373 | switch(wingwall){ | 386 | switch(wingwall){ |
| 374 | case warped_wingwall: | 387 | case warped_wingwall: |
| 375 | if(ds == EXIST) | 388 | if(ds == EXIST) |
calc_gate.h