mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
feat(alarm state): refactor to separe alarm state from radar state. Kown issue: alarm state is not correctly mantained
This commit is contained in:
@@ -48,9 +48,9 @@ namespace ROE {
|
||||
|
||||
namespace ALARM_STATE {
|
||||
enum ALARM_STATEs {
|
||||
AUTO = 0,
|
||||
AUTO = 2,
|
||||
GREEN = 1,
|
||||
RED = 2,
|
||||
RED = 0,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ namespace DataIndex {
|
||||
category,
|
||||
alive,
|
||||
alarmState,
|
||||
radarState,
|
||||
human,
|
||||
controlled,
|
||||
coalition,
|
||||
|
||||
@@ -98,7 +98,7 @@ 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 commandAlarmState(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);
|
||||
@@ -126,12 +126,12 @@ public:
|
||||
virtual void setTargetingRange(double newValue) { updateValue(targetingRange, newValue, DataIndex::targetingRange); }
|
||||
virtual void setAimMethodRange(double newValue) { updateValue(aimMethodRange, newValue, DataIndex::aimMethodRange); }
|
||||
virtual void setAcquisitionRange(double newValue) { updateValue(acquisitionRange, newValue, DataIndex::acquisitionRange); }
|
||||
virtual void setAlarmState(string newValue) { updateValue(alarmState, newValue, DataIndex::alarmState); }
|
||||
virtual void setRadarState(bool newValue) { updateValue(radarState, newValue, DataIndex::radarState); }
|
||||
|
||||
/********** Getters **********/
|
||||
virtual string getCategory() { return category; };
|
||||
virtual bool getAlive() { return alive; }
|
||||
virtual string getAlarmState() { return alarmState; }
|
||||
virtual unsigned char getAlarmState() { return alarmState; }
|
||||
virtual bool getHuman() { return human; }
|
||||
virtual bool getControlled() { return controlled; }
|
||||
virtual unsigned char getCoalition() { return coalition; }
|
||||
@@ -190,6 +190,7 @@ public:
|
||||
virtual double getTargetingRange() { return targetingRange; }
|
||||
virtual double getAimMethodRange() { return aimMethodRange; }
|
||||
virtual double getAcquisitionRange() { return acquisitionRange; }
|
||||
virtual bool getRadarState() { return radarState; }
|
||||
|
||||
protected:
|
||||
unsigned int ID;
|
||||
@@ -205,7 +206,8 @@ protected:
|
||||
string callsign = "";
|
||||
string groupName = "";
|
||||
unsigned char state = State::NONE;
|
||||
string alarmState = "";
|
||||
unsigned char alarmState = ALARM_STATE::AUTO;
|
||||
bool radarState = false;
|
||||
string task = "";
|
||||
bool hasTask = false;
|
||||
Coords position = Coords(NULL);
|
||||
|
||||
Reference in New Issue
Block a user