📄 operation_a.c
字号:
spin(Standard_Time_Table[operation_counter] * 60);
if (spin_time_buff != 6)
spin(spin_time_buff * 60);
if (operation_counter == 21)
{
spin_flash_flag = 0;
}
break;
};
return;
}
else
operation_counter ++;
return;
}
else if (operation_counter == 21)
{
operation_counter = 0;
first_count_flag = 1;
status_buff = STAND_BY;
}
}
/******************************************************************************************
void soft_wash_program(void): 记忆程序运行处理
程序运行根据operation_counter的值判定某一时刻该执行何种对应过程,
和标准及其他程序控制方式类似
******************************************************************************************/
void soft_wash_program(void) // modified from cotton_program
{
if (operation_counter < 33)
{
if (Soft_Time_Table[operation_counter])
{
switch (operation_counter)
{
case 0:
process_buff = Inlet;
case 9:
case 17:
case 25: inlet(Soft_Time_Table[operation_counter], 0, water_level_buff);
break;
case 1:
soak_flash_flag = 1;
process_buff = Soak;
soak(main_soak_time);
if (operation_counter == 2)
{
soak_flash_flag = 0;
}
break;
case 2:
wash_flash_flag = 1;
process_buff = Wash;
wash(main_wash_time * 60);
if (operation_counter == 4)
{
wash_flash_flag = 0;
}
break;
case 10:
case 18:
case 26:
wash(Soft_Time_Table[operation_counter]);
if (operation_counter == 28)
{
rinse_flash_flag = 0;
led_disp.led_2.byte &= 0xbf;
}
break;
case 4:
rinse_flash_flag = 1;
process_buff = Rinse;
drain();
break;
case 12: /* 计数值为12时,判断是否运行留水 */
if((release_save_water_flag == 0)&&(confirm_save_water_flag == 1))
{
if(save_water_once_flag == 0)
{
if ((save_water_num_buff == 0)||(save_water_num_buff == 3)||(save_water_num_buff == 5))
{
run_save_water_flag = 1;
return;
}
}
}
rinse_flash_flag = 1;
drain();
break;
case 20: /* 计数值为20时,判断是否运行留水 */
if((release_save_water_flag == 0)&&(confirm_save_water_flag == 1))
{
if(save_water_once_flag == 0)
{
if ((save_water_num_buff != 0)||(save_water_num_buff !=2))
{
run_save_water_flag = 1;
return;
}
}
}
rinse_flash_flag = 1;
drain();
break;
case 28: /* 计数值为28时,判断是否运行留水 */
if((release_save_water_flag == 0)&&(confirm_save_water_flag == 1))
{
if(save_water_once_flag == 0)
{
if ((save_water_num_buff == 2)||(save_water_num_buff == 4)||(save_water_num_buff == 5))
{
run_save_water_flag = 1;
return;
}
}
}
spin_flash_flag = 1;
process_buff = Spin;
drain();
break;
case 5:
case 13:
case 21:
case 29: interm_spin(Soft_Time_Table[operation_counter]);
break;
case 6:
case 14:
case 22:
spin(Soft_Time_Table[operation_counter]);
break;
case 30:
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 == 33)
{
spin_flash_flag = 0;
led_disp.led_2.byte &= 0x7f;
}
break;
};
return;
}
else
operation_counter ++;
return;
}
else if (operation_counter == 33)
{
operation_counter = 0;
first_count_flag = 1;
status_buff = STAND_BY;
}
}
/******************************************************************************************
void child_program(void): 记忆程序运行处理
程序运行根据operation_counter的值判定某一时刻该执行何种对应过程,
和标准及其他程序控制方式类似
******************************************************************************************/
void child_program(void) // modified from cotton_program and procedure same as soft_program
{
if (operation_counter < 33)
{
if (Child_Time_Table[operation_counter])
{
switch (operation_counter)
{
case 0:
process_buff = Inlet;
case 9:
case 17:
case 25: inlet(Child_Time_Table[operation_counter], 0, water_level_buff);
break;
case 1:
soak_flash_flag = 1;
process_buff = Soak;
soak(main_soak_time);
if (operation_counter == 2)
{
soak_flash_flag = 0;
led_disp.led_2.byte &= 0xef;
}
break;
case 2:
wash_flash_flag = 1;
process_buff = Wash;
wash(main_wash_time * 60);
if (operation_counter == 4)
{
wash_flash_flag = 0;
led_disp.led_2.byte &= 0xdf;
}
break;
case 10:
case 18:
case 26:
wash(Child_Time_Table[operation_counter]);
if (operation_counter == 28)
{
rinse_flash_flag = 0;
led_disp.led_2.byte &= 0xbf;
}
break;
case 4:
rinse_flash_flag = 1;
process_buff = Rinse;
drain();
break;
case 12: /* 计数值为12时,判断是否运行留水 */
if((release_save_water_flag == 0)&&(confirm_save_water_flag == 1))
{
if(save_water_once_flag == 0)
{
if ((save_water_num_buff == 0)||(save_water_num_buff == 3)||(save_water_num_buff == 5))
{
run_save_water_flag = 1;
return;
}
}
}
rinse_flash_flag = 1;
drain();
break;
case 20: /* 计数值为20时,判断是否运行留水 */
if((release_save_water_flag == 0)&&(confirm_save_water_flag == 1))
{
if(save_water_once_flag == 0)
{
if ((save_water_num_buff != 0)||(save_water_num_buff !=2))
{
run_save_water_flag = 1;
return;
}
}
}
rinse_flash_flag = 1;
drain();
break;
case 28: /* 计数值为28时,判断是否运行留水 */
if((release_save_water_flag == 0)&&(confirm_save_water_flag == 1))
{
if(save_water_once_flag == 0)
{
if ((save_water_num_buff == 2)||(save_water_num_buff == 4)||(save_water_num_buff == 5))
{
run_save_water_flag = 1;
return;
}
}
}
spin_flash_flag = 1;
process_buff = Spin;
drain();
break;
case 5:
case 13:
case 21:
case 29: interm_spin(Child_Time_Table[operation_counter]);
break;
case 6:
case 14:
case 22:
spin(Child_Time_Table[operation_counter]);
break;
case 30:
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 == 33)
{
spin_flash_flag = 0;
led_disp.led_2.byte &= 0x7f;
}
break;
};
return;
}
else
operation_counter ++;
return;
}
else if (operation_counter == 33)
{
operation_counter = 0;
first_count_flag = 1;
status_buff = STAND_BY;
}
}
/******************************************************************************************
void wool_program(void): 记忆程序运行处理
程序运行根据operation_counter的值判定某一时刻该执行何种对应过程,
和标准及其他程序控制方式类似
******************************************************************************************/
void wool_program(void) // modified from cotton_program (2 time rinse)
{
if (operation_counter < 25)
{
if (Wool_Time_Table[operation_counter])
{
switch (operation_counter)
{
case 0:
process_buff = Inlet;
case 9:
case 17: inlet(Wool_Time_Table[operation_counter], 0, water_level_buff);
break;
case 1:
soak_flash_flag = 1;
process_buff = Soak;
soak(main_soak_time);
if (operation_counter == 2)
{
soak_flash_flag = 0;
led_disp.led_2.byte &= 0xef;
}
break;
case 2:
wash_flash_flag = 1;
process_buff = Wash;
wash(main_wash_time * 60);
if (operation_counter == 4)
{
wash_flash_flag = 0;
led_disp.led_2.byte &= 0xdf;
}
break;
case 10:
case 18:
wash(Wool_Time_Table[operation_counter]);
if (operation_counter == 20)
{
rinse_flash_flag = 0;
led_disp.led_2.byte &= 0xbf;
}
break;
case 4:
rinse_flash_flag = 1;
process_buff = Rinse;
drain();
break;
case 12: /* 计数值为12时,判断是否运行留水 */
if((release_save_water_flag == 0)&&(confirm_save_water_flag == 1))
{
if(save_water_once_flag == 0)
{
if ((save_water_num_buff == 0)||(save_water_num_buff == 2))
{
run_save_water_flag = 1;
return;
}
}
}
rinse_flash_flag = 1;
drain();
break;
case 20: /* 计数值为20时,判断是否运行留水 */
if((release_save_water_flag == 0)&&(confirm_save_water_flag == 1))
{
if(save_water_once_flag == 0)
{
if ((save_water_num_buff == 1)||(save_water_num_buff == 2))
{
run_save_water_flag = 1;
return;
}
}
}
spin_flash_flag = 1;
process_buff = Spin;
drain();
break;
case 5:
case 13:
case 21: interm_spin(Wool_Time_Table[operation_counter]);
break;
case 6:
case 14:
spin(Wool_Time_Table[operation_counter]);
break;
case 22:
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 == 25)
{
spin_flash_flag = 0;
led_disp.led_2.byte &= 0x7f;
}
break;
};
return;
}
else
operation_counter ++;
return;
}
else if (operation_counter == 25)
{
operation_counter = 0;
first_count_flag = 1;
if (run_demo_flag == 1)
{
status_buff = STAND_BY;
// power_key_flag =1;
Clr_Screen_0(); /* 清屏程序 */
Clr_Screen_1();
Clr_Screen_2();
}
if (run_demo_flag != 1)
status_buff = STAND_BY;
}
}
/******************************************************************************************
void speedy_program(void): 记忆程序运行处理
程序运行根据operation_counter的值判定某一时刻该执行何种对应过程,
和标准及其他程序控制方式类似
******************************************************************************************/
void speedy_program(void) // use R5G speedy_program
{
if (operation_counter < 14)
{
if (Speedy_Time_Table[operation_counter])
{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -