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.
Diff: edge_utils/edge_mgr.cpp
- Revision:
- 7:aa858d789025
- Parent:
- 3:cac964851bb6
- Child:
- 8:5590f55bdf41
diff -r 44ca704f2bc1 -r aa858d789025 edge_utils/edge_mgr.cpp
--- a/edge_utils/edge_mgr.cpp Wed Dec 06 00:35:56 2017 +0000
+++ b/edge_utils/edge_mgr.cpp Thu Dec 07 01:06:46 2017 +0000
@@ -63,8 +63,8 @@
display->clearDisplay() ;
display->locate(0, 0) ;
display->putStr("Sensor Loop") ;
- display->locate(0, 1) ;
- display->putStr(" Started! ") ;
+ display->locate(2, 1) ;
+ display->putStr("Started!") ;
}
}
switch(sensor_index) {
@@ -76,7 +76,7 @@
afero->setAttributeBool(ATTR_ACCEL_PRESENT, false) ;
}
break ;
- case 1: /* color1 */
+ case 1: /* color0 */
if (sensor[sensor_index]) {
afero->setAttributeBool(ATTR_COLOR0_PRESENT, true) ;
afero->setAttributeBool(ATTR_COLOR0_ENABLE, true) ;
@@ -87,7 +87,7 @@
afero->setAttributeBool(ATTR_COLOR0_PRESENT, false) ;
}
break ;
- case 2: /* color2 */
+ case 2: /* color1 */
if (sensor[sensor_index]) {
afero->setAttributeBool(ATTR_COLOR1_PRESENT, true) ;
afero->setAttributeBool(ATTR_COLOR1_ENABLE, true) ;
@@ -107,12 +107,14 @@
}
afero->setAttributeBool(ATTR_TEMP1_PRESENT, true) ;
afero->setAttributeBool(ATTR_TEMP2_PRESENT, true) ;
+
if (lm75b1) {
afero->setAttributeBool(ATTR_TEMP3_PRESENT, true) ;
afero->setAttributeBool(ATTR_TEMP3_ENABLE, true) ;
} else {
afero->setAttributeBool(ATTR_TEMP3_PRESENT, false) ;
}
+
break ;
case 4: /* pressure */
if (sensor[sensor_index]) {
@@ -244,14 +246,14 @@
} else {
printf("LM75B on I2C1 is absent\n") ;
}
-
+#if 0
if (is_present(edge_i2c0, LM75B_I2C_ADDRESS)) {
printf("LM75B on I2C0 is present\n") ;
lm75b1 = new LM75B(edge_i2c0, LM75B_I2C_ADDRESS) ;
} else {
printf("LM75B on I2C0 is absent\n") ;
}
-
+#endif
an0 = new AnalogIn(PIN_AN0) ;
smtc502at0 = new SMTC502AT(an0) ;
an1 = new AnalogIn(PIN_AN1) ;