diff options
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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();
|