summaryrefslogtreecommitdiff
path: root/ldmicro/circuit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ldmicro/circuit.cpp')
-rw-r--r--ldmicro/circuit.cpp46
1 files changed, 46 insertions, 0 deletions
diff --git a/ldmicro/circuit.cpp b/ldmicro/circuit.cpp
index 2868fe2..ebf80ba 100644
--- a/ldmicro/circuit.cpp
+++ b/ldmicro/circuit.cpp
@@ -245,6 +245,16 @@ void AddContact(void)
AddLeaf(ELEM_CONTACTS, c);
}
+void AddContactNeg(void)
+{
+ if(!CanInsertOther) return;
+
+ ElemLeaf *c = AllocLeaf();
+ strcpy(c->d.contacts.name, "Xnew");
+ c->d.contacts.negated = TRUE;
+
+ AddLeaf(ELEM_CONTACTS, c);
+}
void AddCoil(void)
{
if(!CanInsertEnd) return;
@@ -257,6 +267,42 @@ void AddCoil(void)
AddLeaf(ELEM_COIL, c);
}
+void AddCoilNeg(void)
+{
+ if(!CanInsertEnd) return;
+
+ ElemLeaf *c = AllocLeaf();
+ strcpy(c->d.coil.name, "Ynew");
+ c->d.coil.negated = TRUE;
+ c->d.coil.setOnly = FALSE;
+ c->d.coil.resetOnly = FALSE;
+
+ AddLeaf(ELEM_COIL, c);
+}
+void AddCoilSet(void)
+{
+ if(!CanInsertEnd) return;
+
+ ElemLeaf *c = AllocLeaf();
+ strcpy(c->d.coil.name, "Ynew");
+ c->d.coil.negated = FALSE;
+ c->d.coil.setOnly = TRUE;
+ c->d.coil.resetOnly = FALSE;
+
+ AddLeaf(ELEM_COIL, c);
+}
+void AddCoilRes(void)
+{
+ if(!CanInsertEnd) return;
+
+ ElemLeaf *c = AllocLeaf();
+ strcpy(c->d.coil.name, "Ynew");
+ c->d.coil.negated = FALSE;
+ c->d.coil.setOnly = FALSE;
+ c->d.coil.resetOnly = TRUE;
+
+ AddLeaf(ELEM_COIL, c);
+}
void AddTimer(int which)
{
if(!CanInsertOther) return;