diff options
author | Joshua Drake <Joshua.Ellis.Drake@gmail.com> | 2024-06-14 02:19:51 -0500 |
---|---|---|
committer | Joshua Drake <Joshua.Ellis.Drake@gmail.com> | 2024-06-14 02:19:51 -0500 |
commit | 00f8c8b96c4a73fdac7b2ebe31408ee502a315cd (patch) | |
tree | 58b62cb19c5067f9ac2b35949d22658779c2e739 /main.c | |
parent | ed2644ef4e934f2f7cf93890760737790925a1c8 (diff) |
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();
|