
consept_meter
Revision 2:824d7df88ed9, committed 2012-11-06
- Comitter:
- junTMUG
- Date:
- Tue Nov 06 12:31:06 2012 +0000
- Parent:
- 1:39b4d6e71f76
- Child:
- 3:accb9e3920f9
- Commit message:
- Thread???????????
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Nov 06 11:22:47 2012 +0000 +++ b/main.cpp Tue Nov 06 12:31:06 2012 +0000 @@ -320,6 +320,8 @@ Thread::wait(3000); writeCommand4(2, 0x51000100);//---6--- Thread::wait(2500); + + *(bool*)argument = true; } void type1_speed (void const *argument) @@ -339,6 +341,8 @@ writeCommand4(1, 0x51000078); Thread::wait(5200); writeCommand(1, 0xb0); + + *(bool*)argument = true; } int main() @@ -375,8 +379,12 @@ } else if (i == 4) { reb1 (); } else if (i == 5) { - Thread speed_thread(&type1_speed); - Thread tacho_thread(&type1_tacho); + bool speed_done = false; + bool tacho_done = false; + Thread speed_thread(&type1_speed, &speed_done); + Thread tacho_thread(&type1_tacho, tacho_done); + while (!speed_done || !tacho_done) + wait_ms(10); } else if (i == 6) { writeCommand4(1, 0x5000012c);