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.
Diff: DemoPixelSource.h
- Revision:
- 4:a038b8b2ee11
- Parent:
- 1:6ae4383194a1
- Child:
- 5:fa9eb887e9a6
diff -r 8129e159831b -r a038b8b2ee11 DemoPixelSource.h
--- a/DemoPixelSource.h	Mon Oct 15 04:12:41 2018 +0000
+++ b/DemoPixelSource.h	Wed Oct 17 14:00:19 2018 +0000
@@ -6,10 +6,12 @@
 namespace GDE {
 
     class DemoPixelSource: public PixelSource {
+        unsigned char inverted;
     public: 
         virtual unsigned char nextPixelGroup() {
-            return (count++ & 1) ? 0xff : 0x00;
+            return (count++ & 1) ? ~inverted : inverted;
         }
+        void setColor(bool _inverted) { inverted = _inverted ? 0xff : 0x00; }
     };
 
 }
    