|
|
| (13 intermediate revisions by the same user not shown) |
| Line 1: |
Line 1: |
|
| |
| <nowiki>
| |
|
| |
|
| void ConfigurationScans()
| |
| {
| |
| int configuration_select = 0;
| |
| bool refresh_screen = true;
| |
| int encoder_A = 0;
| |
| int encoder_B = 0;
| |
|
| |
| while(configuration_select != -1)
| |
| {
| |
| switch(configuration_select)
| |
| {
| |
| case 0:
| |
| if (refresh_screen)
| |
| {
| |
| ConfigurationMainUnit();
| |
| Controls.reset_All();
| |
| }
| |
| refresh_screen = false;
| |
| break;
| |
| case 1:
| |
| if (refresh_screen)
| |
| ConfigurationPort(0);
| |
| refresh_screen = false;
| |
| break;
| |
| case 2:
| |
| if (refresh_screen)
| |
| ConfigurationPort(1);
| |
| refresh_screen = false;
| |
| break;
| |
| case 3:
| |
| if (refresh_screen)
| |
| ConfigurationPort(2);
| |
| refresh_screen = false;
| |
| break;
| |
| case 4:
| |
| if (refresh_screen)
| |
| ConfigurationPort(3);
| |
| refresh_screen = false;
| |
| break;
| |
| }
| |
|
| |
| if (Controls.pcf_event)
| |
| {
| |
| encoder_A = Controls.encoder_A_Dir();
| |
| encoder_B = Controls.encoder_B_Dir();
| |
| if (encoder_B 1)
| |
| {
| |
| if (configuration_select < 4)
| |
| ++configuration_select;
| |
| refresh_screen = true;
| |
| }
| |
| if (encoder_B -1)
| |
| {
| |
| if (configuration_select > 0)
| |
| --configuration_select;
| |
| refresh_screen = true;
| |
| }
| |
|
| |
| if (Controls.encoder_A_Switch() 1)
| |
| {
| |
| configuration_select = -1;
| |
| }
| |
| Controls.pcf_event = false; // Cleans the interrupt status
| |
| delay(20);
| |
| }
| |
| }
| |
| }
| |
| </nowiki>
| |
|
| |
| [[Pseudo-Medical_Monitor_Code#Custom_Includes]]
| |