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: Led-libary TextLCD mbed
Fork of Mbed-Mensch-8 by
Diff: main.cpp
- Revision:
- 25:b31b49d277fd
- Parent:
- 24:e6620af29329
- Child:
- 26:de10b06e7d4d
--- a/main.cpp Fri Apr 08 09:02:50 2016 +0000
+++ b/main.cpp Fri Apr 08 09:27:30 2016 +0000
@@ -79,7 +79,7 @@
*/
char whichcolor;
uint32_t changecolor[3];
-char selectcolor = 0;//1..R ,2...G,3...B
+char selctecolor = 0;//1..R ,2...G,3...B
@@ -1280,11 +1280,24 @@
out = 0;
//wuerfel helligkeit -> 50%
break;
-
-
-
-
-
+ case 0x16:
+ out = 1;
+ //Farbe -> R
+ selctecolor = 1;
+ break;
+ case 0x56:
+ out = 0;
+ //Farbe -> R
+ selctecolor++;
+ if(selctecolor==4)
+ {
+ depth--;
+ mSelected[depth]=0;
+ }
+ else
+ mSelected[depth - 1]++;
+ break;
+
default:
break;
}
@@ -1300,7 +1313,15 @@
void up()
{
- if (!selectcolor)
+ if (selctecolor)
+ {
+ char temp = TestC&0xff<<(3-selctecolor);
+ TestC = TestC&(0xFFFFFF-(0xff<<(3-selctecolor)));
+ if(temp<0xFF)
+ temp++;
+ TestC=TestC|temp<<(3-selctecolor);
+ }
+ else
if (depth > 0)
{
if (mSelected[depth - 1] < 1)
@@ -1320,7 +1341,15 @@
void down()
{
- if(!selectcolor)
+ if (selctecolor)
+ {
+ char temp = TestC&0xff<<(3-selctecolor);
+ TestC = TestC&(0xFFFFFF-(0xff<<(3-selctecolor)));
+ if(temp>0)
+ temp--;
+ TestC=TestC|temp<<(3-selctecolor);
+ }
+ else
if (depth > 0)
{
char temp = 3;
