Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MCP23017 SDFileSystem WattBob_TextLCD mbed
Revision 8:7f3594882cec, committed 2016-03-02
- Comitter:
- sk398
- Date:
- Wed Mar 02 01:03:09 2016 +0000
- Parent:
- 7:2973bf297f3d
- Child:
- 9:46408a8dea0c
- Commit message:
- All operations now in sync. Small errors with timing however this is tunable;
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Mar 02 00:51:17 2016 +0000
+++ b/main.cpp Wed Mar 02 01:03:09 2016 +0000
@@ -236,7 +236,7 @@
stampTime.start();
}
- if(cyclicTicks % 80 == 0)
+ if(cyclicTicks % 84 == 0)
{
task5t.stop();
printf("T5 %1.2f\r\n",task5t.read());
@@ -249,7 +249,7 @@
task5t.start();
}
- if(cyclicTicks % 40 == 0)
+ if(cyclicTicks % 38 == 0)
{
task1t.stop();
printf("T1 %d\r\n",task1t.read_ms());
@@ -280,27 +280,29 @@
task4t.start();
}
- if(cyclicTicks & 13 == 0)
+ if(cyclicTicks % 6 == 0)
{
- printf("IM IN TASK 3!!!!!!!!!!!!!!!!!!!!!");
- task3t.stop();
- printf("T3 %d\r\n",task3t.read_ms());
- task3.OutputWatchdogPulse();
- taskNum = 2;
- task3t.reset();
- task3t.start();
+ if(taskNum == 2)
+ {
+// printf("IM IN TASK 2!!!!!!!!!!!!!!!!!!!!!\r\n");
+ task2t.stop();
+ printf("T2 %d\r\n",task2t.read_ms());
+ task2SwitchState = task2_switch1.digitalInState();
+ taskNum = 3;
+ task2t.reset();
+ task2t.start();
+ }
+ else if(taskNum == 3)
+ {
+// printf("IM IN TASK 3!!!!!!!!!!!!!!!!!!!!!\r\n");
+ task3t.stop();
+ printf("T3 %d\r\n",task3t.read_ms());
+ task3.OutputWatchdogPulse();
+ taskNum = 2;
+ task3t.reset();
+ task3t.start();
+ }
}
-
- if(cyclicTicks % 12 == 0)
- {
- printf("IM IN TASK 2!!!!!!!!!!!!!!!!!!!!!");
- task2t.stop();
- printf("T2 %d\r\n",task2t.read_ms());
- task2SwitchState = task2_switch1.digitalInState();
- taskNum = 3;
- task2t.reset();
- task2t.start();
- }
if(SDRemoval == HIGH)
{