Preston Stephens
/
MiniProject5_LightTracker
Final
Fork of MiniProject5_LightTracker by
Diff: SegDisplay.cpp
- Revision:
- 14:69cad6d9a2e5
- Parent:
- 13:871d01d0d250
--- a/SegDisplay.cpp Tue Jan 12 01:12:23 2016 +0000 +++ b/SegDisplay.cpp Tue Jan 12 01:41:19 2016 +0000 @@ -34,13 +34,16 @@ for(int i=0;i<25;i++) { if(x<0){Negative=1;} + else{Negative=0;} + wait(0.001); + Negative=0; Display1 =1; - Display = SegConvert(x/10); + Display = SegConvert(abs(x)/10); wait(.001); Display1=0; - + wait(0.0005); Display10 = 1; - Display = SegConvert(x%10); + Display = SegConvert(abs(x)%10); wait(.001); Display10=0; }