Added "operate as" toggle

This commit is contained in:
Pax1601
2023-10-03 17:31:44 +02:00
parent ce5f00e075
commit 569d45d58a
16 changed files with 213 additions and 55 deletions

View File

@@ -43,6 +43,7 @@ namespace DataIndex {
contacts,
activePath,
isLeader,
operateAs,
lastIndex,
endOfData = 255
};

View File

@@ -100,6 +100,7 @@ public:
virtual void setContacts(vector<DataTypes::Contact> newValue);
virtual void setActivePath(list<Coords> newValue);
virtual void setIsLeader(bool newValue) { updateValue(isLeader, newValue, DataIndex::isLeader); }
virtual void setOperateAs(unsigned char newValue) { updateValue(operateAs, newValue, DataIndex::operateAs); }
/********** Getters **********/
virtual string getCategory() { return category; };
@@ -140,6 +141,7 @@ public:
virtual vector<DataTypes::Contact> getTargets() { return contacts; }
virtual list<Coords> getActivePath() { return activePath; }
virtual bool getIsLeader() { return isLeader; }
virtual unsigned char getOperateAs() { return operateAs; }
protected:
unsigned int ID;
@@ -182,6 +184,7 @@ protected:
vector<DataTypes::Contact> contacts;
list<Coords> activePath;
bool isLeader = false;
unsigned char operateAs = 2;
Coords activeDestination = Coords(NULL);
/********** Other **********/