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: easy-connect-v16 Watchdog FP MQTTPacket RecordType-v-16 watersenor_and_temp_code
Revision 46:f545b8f7f242, committed 2018-03-08
- Comitter:
- DuyLionTran
- Date:
- Thu Mar 08 13:59:35 2018 +0000
- Parent:
- 45:92da959d624b
- Child:
- 47:c3707a4f69a7
- Commit message:
- add sending data
Changed in this revision
| Application/main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Application/main.cpp Thu Mar 08 13:54:13 2018 +0000
+++ b/Application/main.cpp Thu Mar 08 13:59:35 2018 +0000
@@ -42,6 +42,7 @@
* Variables
***************************************************************/
bool isUploading = false;
+bool isSendingData = false;
uint8_t uploadType = ADC_VALUE;
uint8_t currentCalibMode = 1;
uint8_t calibStateCounter = 0;
@@ -205,6 +206,7 @@
}
else {
if (intervalSecondCounter == INTERVAL_BETWEEN_EACH_UPLOAD_TYPE) {
+
if (MQTT_PublishAll(&client, seconds, uploadType, DataStruct) == MQTT::SUCCESS) {
myled = 1;
uploadType++;