summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.c b/main.c
index ca5aa4b..8f9700c 100644
--- a/main.c
+++ b/main.c
@@ -58,6 +58,7 @@ int main(void)
if (relay_delay)
{
active(activeResistors);
+ setI2CArray(2,activeResistors[0] | (activeResistors[0]<<4));
if (*timeoutcounter < 2)
{
_LATB8 = 1;
@@ -79,7 +80,8 @@ int main(void)
}
else //Open contactors if I2C communication is broken.
{
- if (relay_delay) Message_OUT(activeResistors[0] - 1, activeResistors[1] - 1, 0);
+ if ((activeResistors[0] > 0) || (activeResistors[1] > 0)) Message_OUT(activeResistors[0] - 1, activeResistors[1] - 1, 0);
+ else Message_OUT(0, 0, 0);
_LATB7 = 1; //Make sure activity light is off
_LATB8 = 0;
//Message_HWCROCL();