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: MCP23S17 PCF8574 TextLCD eeprom mbed-dev
Diff: main.cpp
- Revision:
- 9:077d1ad96bca
- Parent:
- 8:e6e4eece90f7
- Child:
- 10:efe8585f7fa4
--- a/main.cpp Mon Oct 10 15:08:44 2016 +0000
+++ b/main.cpp Mon Oct 10 15:55:52 2016 +0000
@@ -250,7 +250,7 @@
for (ConfigureSensor = 0; ConfigureSensor < 16; ConfigureSensor++)
{
- if((Config[ConfigureSensor]<<1) != NOTUSED)
+ if((Config[ConfigureSensor <<1]) != NOTUSED)
{
SelectSensorPort(ConfigureSensor); //set up H/W mux for this sensor
@@ -503,19 +503,25 @@
case STD_YELLOW:
{
- if( (GreenProp <= (GreenThreshold-Hysteresis)) && (RedProp >=(RedThreshold+Hysteresis)) )
- {
- LEDColour = YELLOW;
+ if ((RedProp - GreenProp) < 60) //check it is not red!
+ {
+ if( (GreenProp <= (GreenThreshold-Hysteresis)) && (RedProp >=(RedThreshold+Hysteresis)) )
+ {
+ LEDColour = YELLOW;
+ }
}
}
break;
case GREEN_YELLOW:
{
+
if( (GreenProp <= (GreenThreshold-Hysteresis)) && (RedProp >=(RedThreshold+Hysteresis)) )
{ //pretty sure it's Yellow
-
- LEDColour = YELLOW;
+ if ((RedProp - GreenProp) < 60) //check it is not red!
+ {
+ LEDColour = YELLOW;
+ }
}
else
{