uwizeyimana abdulkarim / Mbed 2 deprecated mobileproject

Dependencies:   mbed

Revision:
10:bdd6069f1345
Parent:
9:9ff8ceda23ac
Child:
11:54d3db4e073d
--- a/main.cpp	Mon Jul 12 07:24:48 2021 +0000
+++ b/main.cpp	Mon Jul 12 15:17:31 2021 +0000
@@ -35,7 +35,7 @@
 int direction=0;
 int i=0;
 int pushDuration;
-int current=0;
+int Situation=0;
 int state=0;
  
 string str1 = "Menu of the Day";
@@ -104,7 +104,7 @@
 //message to display when in forward mode
 void forwards(){
    display(topics[i]);
-   current=i;
+   Situation=i;
    i+=1;
    if(i>4){
        i=0;
@@ -113,7 +113,7 @@
 //message to display in backward mode
 void backwards(){
   display(topics[i]);
-  current=i;
+  Situation=i;
   i-=1;
   if(i<0){
       i=4;
@@ -155,7 +155,7 @@
   //message to call when switch is rised
 void riseSwt(){
     time(&startReading);
-     display(content[current]);
+     display(content[Situation]);
     topicTicker.detach();
 }
 // declaration messages to be sent on the cloud 
@@ -193,9 +193,9 @@
     printf("Reading time is:%d \n",readingDuration);
     if(readingDuration>5){
         
-        printf("message sent,Item Id is:%d \n",current+1);
+        printf("message sent,Item Id is:%d \n",Situation+1);
        char device[] = "mobile";
-      int topic = current+1; // topic identifier
+      int topic = Situation+1; // topic identifier
     
         send_message(create_message(device,topic,readingDuration));