📄 operation_a.c
字号:
switch (operation_counter)
{
case 0:
process_buff = Inlet;
case 7: inlet(Speedy_Time_Table[operation_counter], 0, water_level_buff);
break;
case 1:
wash_flash_flag = 1;
process_buff = Wash;
wash(main_wash_time * 60);
if (run_stream_time == 0)
{
balance_time_buff = 0; // ????????? good sample for spin processing
operation_counter -- ; // ????????? need considering which is better
}
if (operation_counter == 2)
{
wash_flash_flag = 0;
}
break;
case 8:
wash(Speedy_Time_Table[operation_counter]);
if (run_stream_time == 0)
{
balance_time_buff = 0; // ????????? good sample for spin processing
operation_counter -- ; // ????????? need considering which is better
}
if (operation_counter == 9)
{
rinse_flash_flag = 0;
led_disp.led_2.byte &= 0xbf;
}
break;
case 2:
rinse_flash_flag = 1;
process_buff = Rinse;
drain();
break;
case 9: /* 计数值为9时,判断是否运行留水 */
if((release_save_water_flag == 0)&&(confirm_save_water_flag == 1))
{
if(save_water_once_flag == 0)
{
run_save_water_flag = 1;
return;
}
}
spin_flash_flag = 1;
process_buff = Spin;
drain();
break;
case 3:
case 10: interm_spin(Speedy_Time_Table[operation_counter]);
break;
case 4:
case 11: spin(Speedy_Time_Table[operation_counter] * 60);
if (operation_counter == 14)
{
spin_flash_flag = 0;
}
break;
};
return;
}
else
operation_counter ++;
return;
}
else if (operation_counter == 14)
{
operation_counter = 0;
first_count_flag = 1;
status_buff = STAND_BY;
}
}
/******************************************************************************************
void single_wash_program(void): 记忆程序运行处理
程序运行根据operation_counter的值判定某一时刻该执行何种对应过程,
和标准及其他程序控制方式类似
******************************************************************************************/
void single_wash_program(void) // new procedure
{
if (operation_counter < 3)
{
if (Single_Wash_Time_Table[operation_counter])
{
switch (operation_counter)
{
case 0:
process_buff = Inlet;
inlet(Single_Wash_Time_Table[operation_counter], 0, water_level_buff);
break;
case 1:
wash_flash_flag = 1;
process_buff = Wash;
wash(main_wash_time * 60);
if (operation_counter == 3)
{
wash_flash_flag = 0;
}
break;
};
return;
}
else
operation_counter ++;
return;
}
else if (operation_counter == 3)
{
operation_counter = 0;
first_count_flag = 1;
status_buff = STAND_BY;
}
}
/******************************************************************************************
void rinse_program(void): 记忆程序运行处理
程序运行根据operation_counter的值判定某一时刻该执行何种对应过程,
和标准及其他程序控制方式类似
******************************************************************************************/
void rinse_program(void) // new procedure
{
if (operation_counter < 8)
{
if (Rinse_Time_Table[operation_counter])
{
switch (operation_counter)
{
case 5: inlet(Rinse_Time_Table[operation_counter], 0, water_level_buff);
break;
case 6:
wash_flash_flag = 1;
wash(Rinse_Time_Table[operation_counter]);
if (operation_counter == 8)
{
wash_flash_flag = 0;
}
break;
case 0:
process_buff = Rinse;
rinse_flash_flag = 1;
drain();
break;
case 1: interm_spin(Rinse_Time_Table[operation_counter]);
break;
case 2: spin(Rinse_Time_Table[operation_counter]);
break;
};
return;
}
else
operation_counter ++;
return;
}
else if (operation_counter == 8)
{
operation_counter = 0;
first_count_flag = 1;
status_buff = STAND_BY;
}
}
/******************************************************************************************
void single_spin_program(void): 记忆程序运行处理
程序运行根据operation_counter的值判定某一时刻该执行何种对应过程,
和标准及其他程序控制方式类似
******************************************************************************************/
void single_spin_program(void) // new procedure
{
if (operation_counter < 5)
{
if (Single_Spin_Time_Table[operation_counter])
{
switch (operation_counter)
{
case 0:
spin_flash_flag = 1;
process_buff = Spin;
drain();
break;
case 1: interm_spin(Single_Spin_Time_Table[operation_counter]);
break;
case 2:
if (spin_time_buff == 6)
spin(Standard_Time_Table[operation_counter] * 60);
if (spin_time_buff != 6)
spin(spin_time_buff * 60);
if (operation_counter == 5)
{
spin_flash_flag = 0;
led_disp.led_2.byte &= 0x7f;
}
break;
};
return;
}
else
operation_counter ++;
return;
}
else if (operation_counter == 5)
{
operation_counter = 0;
first_count_flag = 1;
status_buff = STAND_BY;
}
}
/******************************************************************************************
******************************************************************************************/
void special_program(void)
{
;
}
void woven_program(void)
{
;
}
/******************************************************************************************
******************************************************************************************/
void maotan_program(void)
{
;
}
/******************************************************************************************
void tubedry_program(void): 记忆程序运行处理
程序运行根据operation_counter的值判定某一时刻该执行何种对应过程,
和标准及其他程序控制方式类似
******************************************************************************************/
void tubedry_program(void)
{
static unsigned char m;
static unsigned char n = 0;
if (operation_counter < 7)
{
if (n == 0)
{
output_buff |= DRAIN;
process_buff = Tubedry;
}
if (TubeDry_Time_Table[operation_counter])
{
switch (operation_counter)
{
case 0:
case 2:
case 4: interm_spin(TubeDry_Time_Table[operation_counter] * 60);
break;
case 1:
case 3:
inertial_30s_buff = 0;
break_5s_buff = 0;
m = operation_counter;
spin(TubeDry_Time_Table[operation_counter] * 60);
if (m != operation_counter)
operation_counter -=2;
break;
case 5:
inertial_30s_buff = 0;
// break_5s_buff = 0;
m = operation_counter;
spin(TubeDry_Time_Table[operation_counter] * 60);
if (m != operation_counter)
operation_counter -=1;
};
return;
}
else
operation_counter ++;
return;
}
else if (operation_counter == 7)
{
operation_counter = 0;
first_count_flag = 1;
status_buff = STAND_BY;
}
}
/******************************************************************************************
******************************************************************************************/
/*
void tubedry_program(void)
{
static unsigned char m;
static unsigned char n = 0;
if (operation_counter < 7)
{
if (n == 0)
{
m = operation_counter;
drain();
if (m != operation_counter)
{
operation_counter -=1;
n = 1;
}
else
return;
}
if (TubeDry_Time_Table[operation_counter])
{
switch (operation_counter)
{
case 0:
case 2:
case 4: interm_spin(TubeDry_Time_Table[operation_counter] * 60);
break;
case 1:
case 3:
inertial_30s_buff = 0;
break_5s_buff = 0;
m = operation_counter;
spin(TubeDry_Time_Table[operation_counter] * 60);
if (m != operation_counter)
operation_counter -=2;
break;
case 5:
inertial_30s_buff = 0;
// break_5s_buff = 0;
m = operation_counter;
spin(TubeDry_Time_Table[operation_counter] * 60);
if (m != operation_counter)
operation_counter -=1;
};
return;
}
else
operation_counter ++;
return;
}
else if (operation_counter == 7)
{
operation_counter = 0;
first_count_flag = 1;
status_buff = STAND_BY;
}
}
*/
/******************************************************************************************
******************************************************************************************/
void test_no_water(void)
{
;
}
void test_production(void)
{
;
}
void test_cycle(void)
{
status_buff = INITIAL;
return;
}
void test_interm_spin(void)
{
;
}
void test_weight(void)
{
;
}
void weight_test(void)
{
weight_buff = WEIGHT_2;
water_level_buff = 4;
water_count = water_level_buff;
led_disp.led_1.byte = 0xf7;
// led_flash_buff = led_disp.led_1.byte;
water_flash_flag = 1;
weight_finish_flag = 1;
return;
}
void texture_test(void)
{
texture_buff = HARD_TXT;
texture_finish_flag = 1;
return;
}
void save_water(void)
{
if(start_save_water_flag == 0)
{
save_water_4hour_buff = 4;
start_save_water_flag =1;
save_water_once_flag = 1;
}
if (lid_open_close_flag == 1)
{
run_save_water_flag = 0;
release_save_water_flag = 1;
start_save_water_flag = 0;
save_water_number --;
}
else if (save_water_4hour_buff == 0)
{
run_save_water_flag = 0;
release_save_water_flag = 1;
start_save_water_flag = 0;
save_water_number --;
}
return;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -