Easylube

Dependencies:   DS1820 libmDot mbed-rtos mbed

Files at this revision

API Documentation at this revision

Comitter:
TataLora
Date:
Fri Oct 14 08:43:33 2016 +0000
Parent:
2:26ffaed90e4f
Commit message:
EasyLube

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 26ffaed90e4f -r 323401b1b227 main.cpp
--- a/main.cpp	Wed Aug 31 21:01:30 2016 +0000
+++ b/main.cpp	Fri Oct 14 08:43:33 2016 +0000
@@ -16,7 +16,7 @@
 #define LORA_NETWORK_NAME                   "MultiTech"
 #define LORA_NETWORK_PASS                   "MultiTech"
 #define LORA_NETWORK_FREQUENCY_SUB_BAND     1
-#define LORA_MAX_ATTEMPTS                   1
+#define LORA_MAX_ATTEMPTS                   2
 
  
 static std::string message_prefix = MESSAGE_PREFIX;
@@ -64,6 +64,9 @@
             data.push_back((uint8_t) 'A'); data.push_back((uint8_t) 'L'); 
             break;
         case EasyLube::NO_SIGNAL: 
+            //01-09-2016 21:32 toegevoegd, werd eerst PU gestuurd
+            data.push_back((uint8_t) 'N'); data.push_back((uint8_t) 'S'); 
+            break;
         case EasyLube::POWER_UP:
             data.push_back((uint8_t) 'P'); data.push_back((uint8_t) 'U'); 
             break;
@@ -107,6 +110,10 @@
             DS1820 probe(TEMP_DATA_PIN);
             probe.convertTemperature(true);
             float temp = probe.temperature();
+            if(temp != temp)
+            {
+                temp = TEMP_ERROR;    
+            }
             //Get message with temp
             data = createMessage(activity, temp);
         }