fake coffee machine

Dependencies:   Servo TextLCD mbed

Files at this revision

API Documentation at this revision

Comitter:
tuffnatty
Date:
Tue Dec 16 16:56:58 2014 +0000
Parent:
0:2886eabcadbc
Commit message:
new variant

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 2886eabcadbc -r dd54f5e7db5c main.cpp
--- a/main.cpp	Fri Dec 05 18:20:56 2014 +0000
+++ b/main.cpp	Tue Dec 16 16:56:58 2014 +0000
@@ -70,7 +70,7 @@
 void reset() {
     int n = type_switch;
     //lcd.printf("type %d\n", n);
-    if (type_switch == 0) {
+    if (0/*type_switch == 0*/) {
         left[COFFEE] = 15;
         left[COCOA] = 5;
         left[MILK] = 3;
@@ -124,15 +124,20 @@
         now_choco = choco_button;
         now_espresso = espresso_button;
         if (!was_americano && now_americano) {
-            try_drink(4, 0, 0, 2);
+            //try_drink(4, 0, 0, 2);
+            try_drink(1, 0, 0, 1);
         } else if (!was_latte && now_latte) {
-            try_drink(2, 0, 1, 0);
+            //try_drink(2, 0, 1, 0);
+            try_drink(1, 0, 1, 0);
         } else if (!was_mocco && now_mocco) {
-            try_drink(3, 1, 0, 0);
+            //try_drink(3, 1, 0, 0);
+            try_drink(2, 2, 1, 1);
         } else if (!was_choco && now_choco) {
-            try_drink(0, 2, 1, 0);
+            //try_drink(0, 2, 1, 0);
+            try_drink(0, 3, 1, 0);
         } else if (!was_espresso && now_espresso) {
-            try_drink(2, 0, 0, 1);
+            //try_drink(2, 0, 0, 1);
+            try_drink(5, 0, 0, 1);
         }
         was_americano = now_americano;
         was_latte = now_latte;