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: X_NUCLEO_COMMON ST_INTERFACES
Revision 37:ec1124e5ec1f, committed 2019-12-05
- Comitter:
- JimCarver
- Date:
- Thu Dec 05 19:03:48 2019 +0000
- Parent:
- 36:b93393bb0e6d
- Commit message:
- Bug fix
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r b93393bb0e6d -r ec1124e5ec1f main.cpp
--- a/main.cpp Wed Nov 27 01:33:50 2019 +0000
+++ b/main.cpp Thu Dec 05 19:03:48 2019 +0000
@@ -99,7 +99,7 @@
strcpy(DoorCode, newValue.c_str());
printf("%s\r\n", DoorCode);
if(!strcmp(DoorCode, DoorPassword )) {
- DoorActivate = 1; * Activate relay for 1500ms */
+ DoorActivate = 1; /* Activate relay for 1500ms */
wait_ms(1500);
DoorActivate = 0;
DoorCode[0] = NULL;
@@ -179,18 +179,16 @@
* This function is called periodically.
*/
void sensors_update() {
- float temp1_value, temp2_value, humid_value, pressure_value;
+ float temp1_value, humid_value, pressure_value;
uint32_t distance_value, distance_reading;
if(!dflag++) { /* Only update the sensors once a minute */
sen_hum_temp.get_humidity(&humid_value);
sen_hum_temp.get_temperature(&temp1_value);
sen_press_temp.get_pressure(&pressure_value);
- sen_press_temp.get_temperature(&temp2_value);
res_humidity->set_value(humid_value);
res_temperature->set_value(temp1_value);
res_pressure->set_value(pressure_value);
- res_temperature2->set_value(temp2_value);
if(ErrorLockoutTime != 0) {
ErrorLockoutTime--;
if(ErrorLockoutTime == 0) {
@@ -295,11 +293,6 @@
res_humidity->methods(M2MMethod::GET);
res_humidity->observable(true);
- res_temperature2 = client.create_resource("3303/1/5700", "Temperature LPS22HB (C)");
- res_temperature2->set_value(0);
- res_temperature2->methods(M2MMethod::GET);
- res_temperature2->observable(true);
-
res_pressure = client.create_resource("3323/0/5700", "Pressure");
res_pressure->set_value(0);
res_pressure->methods(M2MMethod::GET);