Skip to content

Commit

Permalink
Default chem tank capacity for IntelliChem to 6 no units.
Browse files Browse the repository at this point in the history
  • Loading branch information
rstrouse authored and tagyoureit committed Feb 11, 2021
1 parent edcda15 commit 706e0d0
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 1 deletion.
4 changes: 4 additions & 0 deletions controller/boards/IntelliCenterBoard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3381,6 +3381,8 @@ export class IntelliCenterChemControllerCommands extends ChemControllerCommands
if (err) { reject(err); }
else {
chem.isActive = false;
chem.acidTankCapacity = chem.orpTankCapacity = 6;
chem.acidTankUnits = chem.orpTankUnits = '';
let schem = state.chemControllers.getItemById(id);
schem.isActive = false;
sys.chemControllers.removeItemById(id);
Expand Down Expand Up @@ -3465,6 +3467,8 @@ export class IntelliCenterChemControllerCommands extends ChemControllerCommands
chem.alkalinity = alkalinity;
chem.type = 2;
chem.name = name;
chem.acidTankCapacity = chem.orpTankCapacity = 6;
chem.acidTankUnits = chem.orpTankUnits = '';
let cstate = state.chemControllers.getItemById(id, true);
cstate.body = chem.body;
cstate.address = chem.address;
Expand Down
2 changes: 2 additions & 0 deletions controller/comms/messages/config/ExternalMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ export class ExternalMessage {
controller.isActive = scontroller.isActive = isActive;
if (isActive) {
controller.isVirtual = false;
controller.acidTankCapacity = controller.orpTankCapacity = 6;
controller.acidTankUnits = controller.orpTankUnits = '';
scontroller.type = controller.type = 2;
scontroller.name = controller.name = (controller.name || 'IntelliChem' + id);
scontroller.body = controller.body = msg.extractPayloadByte(3);
Expand Down
3 changes: 3 additions & 0 deletions controller/comms/messages/config/HeaterMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ export class HeaterMessage {
// only support for 1 ic with EasyTouch
let chem = sys.chemControllers.getItemByAddress(144, true);
state.chemControllers.getItemById(chem.id, true);
chem.acidTankCapacity = chem.orpTankCapacity = 6;
chem.acidTankUnits = chem.orpTankUnits = '';

}
else {
let chem = sys.chemControllers.getItemByAddress(144);
Expand Down
2 changes: 2 additions & 0 deletions controller/comms/messages/config/IntellichemMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ export class IntellichemMessage {
if (typeof scontroller.name === 'undefined') controller.name = 'IntelliChem ' + (i + 1);
scontroller.name = controller.name;
controller.cyanuricAcid = msg.extractPayloadInt((i * 2) + 26);
controller.acidTankCapacity = controller.orpTankCapacity = 6;
controller.acidTankUnits = controller.orpTankUnits = '';

if (typeof scontroller.acidTankLevel === 'undefined') scontroller.acidTankLevel = 0;
if (typeof scontroller.orpTankLevel === 'undefined') scontroller.orpTankLevel = 0;
Expand Down
6 changes: 5 additions & 1 deletion controller/comms/messages/status/IntelliChemStateMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ export class IntelliChemStateMessage {
// We have not talked to the chem controller in 30 seconds so we have lost communication.
scontroller.status = scontroller.alarms.comms = 1;
}
controller.acidTankCapacity = controller.orpTankCapacity = 6;
controller.acidTankUnits = controller.orpTankUnits = '';
msg.isProcessed = true;
break;
// ---------- OCP set get ----------- //
Expand Down Expand Up @@ -136,7 +138,9 @@ export class IntelliChemStateMessage {
controller.name = controller.name || `Chem Controller ${controller.address - 143}`; // default to true id if no name is set
scontroller.lastComm = new Date().getTime();
scontroller.status = scontroller.alarms.comms = 0;

controller.acidTankCapacity = controller.orpTankCapacity = 6;
controller.acidTankUnits = controller.orpTankUnits = '';

scontroller.address = controller.address;
scontroller.pHLevel = msg.extractPayloadIntBE(0) / 100;
scontroller.orpLevel = msg.extractPayloadIntBE(2);
Expand Down

0 comments on commit 706e0d0

Please sign in to comment.