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.
Fork of scoreLight_Advanced by
simpleLaserRenderer.h@2:34157ebbf56b, 2012-03-31 (annotated)
- Committer:
 - mbedalvaro
 - Date:
 - Sat Mar 31 12:50:32 2012 +0000
 - Revision:
 - 2:34157ebbf56b
 - Parent:
 - 1:a4050fee11f7
 - Child:
 - 3:b44ff6de81bd
 
- Debugged some subtle problem that made the motion of the rigidLoops strange (when damping factor was too small, the blobs would start moving faster and faster sometimes, and oscillate - the reason being the VERLET integration and the fact that the up...
Who changed what in which revision?
| User | Revision | Line number | New contents of line | 
|---|---|---|---|
| mbedalvaro | 0:345b3bc7a0ea | 1 | #ifndef simpleLaserSensingRenderer_h | 
| mbedalvaro | 0:345b3bc7a0ea | 2 | #define simpleLaserSensingRenderer_h | 
| mbedalvaro | 0:345b3bc7a0ea | 3 | |
| mbedalvaro | 0:345b3bc7a0ea | 4 | #include "blobConfig.h" | 
| mbedalvaro | 0:345b3bc7a0ea | 5 | // Include hardware interface for display and sensing: | 
| mbedalvaro | 0:345b3bc7a0ea | 6 | #include "hardwareIO.h" | 
| mbedalvaro | 0:345b3bc7a0ea | 7 | |
| mbedalvaro | 0:345b3bc7a0ea | 8 | //extern DigitalOut myled3; // for tests... | 
| mbedalvaro | 0:345b3bc7a0ea | 9 | |
| mbedalvaro | 0:345b3bc7a0ea | 10 | #define debugDelayMirrors // this is to check visually the mirror delay (but it is also beautiful) | 
| mbedalvaro | 0:345b3bc7a0ea | 11 | |
| mbedalvaro | 2:34157ebbf56b | 12 | #define RENDER_INTERVAL 0.00011 // good value in previous version (monaco) was 0.00011 // in seconds (Ticker) | 
| mbedalvaro | 0:345b3bc7a0ea | 13 | |
| mbedalvaro | 0:345b3bc7a0ea | 14 | class simpleLaserSensingRenderer { | 
| mbedalvaro | 0:345b3bc7a0ea | 15 | public: | 
| mbedalvaro | 0:345b3bc7a0ea | 16 | |
| mbedalvaro | 0:345b3bc7a0ea | 17 | void setConfigToRender(blobConfig*); | 
| mbedalvaro | 0:345b3bc7a0ea | 18 | //void startRenderer(); // pb: I cannot use the ticker function inside the class! | 
| mbedalvaro | 0:345b3bc7a0ea | 19 | void laserRenderThread(); | 
| mbedalvaro | 0:345b3bc7a0ea | 20 | void laserRenderThreadONEBLOBONLY(); | 
| mbedalvaro | 0:345b3bc7a0ea | 21 | // void laserRender(blobConfig*); | 
| mbedalvaro | 0:345b3bc7a0ea | 22 | |
| mbedalvaro | 0:345b3bc7a0ea | 23 | blobConfig* ptBlobCfToRender; | 
| mbedalvaro | 0:345b3bc7a0ea | 24 | int totalBlobs; | 
| mbedalvaro | 0:345b3bc7a0ea | 25 | int currentBlob; | 
| mbedalvaro | 0:345b3bc7a0ea | 26 | int currentPoint; | 
| mbedalvaro | 0:345b3bc7a0ea | 27 | int currentMirrorDelay; | 
| mbedalvaro | 0:345b3bc7a0ea | 28 | int currentTotalPoints; | 
| mbedalvaro | 0:345b3bc7a0ea | 29 | int currentColor; | 
| mbedalvaro | 0:345b3bc7a0ea | 30 | int x,y; // auxiliary variables storing mirror position(0-4096) | 
| mbedalvaro | 0:345b3bc7a0ea | 31 | }; | 
| mbedalvaro | 0:345b3bc7a0ea | 32 | |
| mbedalvaro | 0:345b3bc7a0ea | 33 | #endif | 
| mbedalvaro | 0:345b3bc7a0ea | 34 | |
| mbedalvaro | 0:345b3bc7a0ea | 35 | |
| mbedalvaro | 0:345b3bc7a0ea | 36 | 
