ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el18gs

Dependencies:   mbed

Revision:
7:220d3ebf74cf
Parent:
3:9d811414d35e
Child:
8:4220d116f17c
diff -r d755c4c56bdd -r 220d3ebf74cf Inventory/Ghost/Ghost.cpp
--- a/Inventory/Ghost/Ghost.cpp	Mon May 11 18:14:40 2020 +0000
+++ b/Inventory/Ghost/Ghost.cpp	Mon May 11 18:28:37 2020 +0000
@@ -79,13 +79,13 @@
     _root = root;
     _uid = gen_uid();
     int type = 0;
-    if (num < 50) {
+    if ((num > 0) && (num < 50)) {
         type = 0;
-    } else if (num < 65) {
+    } else if ((num >= 50) && (num < 70)) {
         type = 1;
-    } else if (num < 80) {
+    } else if ((num >= 70) && (num < 85)) {
         type = 2;
-    } else if (num < 95) {
+    } else if ((num >= 85) && (num < 95)) {
         type = 3;
     } else {
         type = 4;