fix: Added setting of forced AlarmState

This commit is contained in:
Pax1601
2025-03-24 21:07:08 +01:00
parent 1622d663bb
commit 2b5b428237
3 changed files with 10 additions and 6 deletions

View File

@@ -46,8 +46,8 @@ namespace ROE {
};
}
namespace ALARM_STATE {
enum ALARM_STATEs {
namespace AlarmState {
enum AlarmStates {
AUTO = 2,
GREEN = 1,
RED = 0,

View File

@@ -67,6 +67,7 @@ public:
/********** Setters **********/
virtual void setCategory(string newValue) { updateValue(category, newValue, DataIndex::category); }
virtual void setAlive(bool newValue) { updateValue(alive, newValue, DataIndex::alive); }
virtual void setAlarmState(unsigned char newValue, bool force = false);
virtual void setHuman(bool newValue) { updateValue(human, newValue, DataIndex::human); }
virtual void setControlled(bool newValue) { updateValue(controlled, newValue, DataIndex::controlled); }
virtual void setCoalition(unsigned char newValue) { updateValue(coalition, newValue, DataIndex::coalition); }
@@ -98,7 +99,6 @@ public:
virtual void setTargetID(unsigned int newValue) { updateValue(targetID, newValue, DataIndex::targetID); }
virtual void setTargetPosition(Coords newValue) { updateValue(targetPosition, newValue, DataIndex::targetPosition); }
virtual void setROE(unsigned char newValue, bool force = false);
virtual void setAlarmState(unsigned char newValue, bool force = false);
virtual void setReactionToThreat(unsigned char newValue, bool force = false);
virtual void setEmissionsCountermeasures(unsigned char newValue, bool force = false);
virtual void setTACAN(DataTypes::TACAN newValue, bool force = false);
@@ -206,7 +206,7 @@ protected:
string callsign = "";
string groupName = "";
unsigned char state = State::NONE;
unsigned char alarmState = ALARM_STATE::AUTO;
unsigned char alarmState = AlarmState::AUTO;
bool radarState = false;
string task = "";
bool hasTask = false;