finally works
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
|
||||
#include "fsfw/devicehandlers/DeviceHandlerIF.h"
|
||||
|
||||
namespace BpxBattery {
|
||||
namespace bpxBat {
|
||||
|
||||
enum LocalPoolIds {
|
||||
CHARGE_CURRENT = 0,
|
||||
@ -114,18 +114,18 @@ class BpxHkDeserializer : public SerialLinkedListAdapter<SerializeIF> {
|
||||
}
|
||||
};
|
||||
|
||||
}; // namespace BpxBattery
|
||||
}; // namespace bpxBat
|
||||
|
||||
/**
|
||||
* @brief BPX HK data holder
|
||||
*/
|
||||
class BpxBatteryHk : public StaticLocalDataSet<BpxBattery::HK_ENTRIES> {
|
||||
class BpxBatteryHk : public StaticLocalDataSet<bpxBat::HK_ENTRIES> {
|
||||
public:
|
||||
/**
|
||||
* Constructor for data users
|
||||
* @param gyroId
|
||||
*/
|
||||
BpxBatteryHk(object_id_t bpxId) : StaticLocalDataSet(sid_t(bpxId, BpxBattery::HK_SET_ID)) {
|
||||
BpxBatteryHk(object_id_t bpxId) : StaticLocalDataSet(sid_t(bpxId, bpxBat::HK_SET_ID)) {
|
||||
setAllVariablesReadOnly();
|
||||
}
|
||||
|
||||
@ -176,28 +176,25 @@ class BpxBatteryHk : public StaticLocalDataSet<BpxBattery::HK_ENTRIES> {
|
||||
}
|
||||
|
||||
//! Charge current in mA
|
||||
lp_var_t<uint16_t> chargeCurrent =
|
||||
lp_var_t<uint16_t>(sid.objectId, BpxBattery::CHARGE_CURRENT, this);
|
||||
lp_var_t<uint16_t> chargeCurrent = lp_var_t<uint16_t>(sid.objectId, bpxBat::CHARGE_CURRENT, this);
|
||||
//! Discharge current in mA
|
||||
lp_var_t<uint16_t> dischargeCurrent =
|
||||
lp_var_t<uint16_t>(sid.objectId, BpxBattery::DISCHARGE_CURRENT, this);
|
||||
lp_var_t<uint16_t>(sid.objectId, bpxBat::DISCHARGE_CURRENT, this);
|
||||
//! Heater current in mA
|
||||
lp_var_t<uint16_t> heaterCurrent =
|
||||
lp_var_t<uint16_t>(sid.objectId, BpxBattery::HEATER_CURRENT, this);
|
||||
lp_var_t<uint16_t> heaterCurrent = lp_var_t<uint16_t>(sid.objectId, bpxBat::HEATER_CURRENT, this);
|
||||
|
||||
//! Battery voltage in mV
|
||||
lp_var_t<uint16_t> battVoltage = lp_var_t<uint16_t>(sid.objectId, BpxBattery::BATT_VOLTAGE, this);
|
||||
lp_var_t<uint16_t> battVoltage = lp_var_t<uint16_t>(sid.objectId, bpxBat::BATT_VOLTAGE, this);
|
||||
//! Battery temperature 1 in degC
|
||||
lp_var_t<int16_t> battTemp1 = lp_var_t<int16_t>(sid.objectId, BpxBattery::BATT_TEMP_1, this);
|
||||
lp_var_t<int16_t> battTemp1 = lp_var_t<int16_t>(sid.objectId, bpxBat::BATT_TEMP_1, this);
|
||||
//! Battery temperature 2 in degC
|
||||
lp_var_t<int16_t> battTemp2 = lp_var_t<int16_t>(sid.objectId, BpxBattery::BATT_TEMP_2, this);
|
||||
lp_var_t<int16_t> battTemp2 = lp_var_t<int16_t>(sid.objectId, bpxBat::BATT_TEMP_2, this);
|
||||
//! Battery temperature 3 in degC
|
||||
lp_var_t<int16_t> battTemp3 = lp_var_t<int16_t>(sid.objectId, BpxBattery::BATT_TEMP_3, this);
|
||||
lp_var_t<int16_t> battTemp3 = lp_var_t<int16_t>(sid.objectId, bpxBat::BATT_TEMP_3, this);
|
||||
//! Battery temperature 4 in degC
|
||||
lp_var_t<int16_t> battTemp4 = lp_var_t<int16_t>(sid.objectId, BpxBattery::BATT_TEMP_4, this);
|
||||
lp_var_t<uint32_t> rebootCounter =
|
||||
lp_var_t<uint32_t>(sid.objectId, BpxBattery::REBOOT_COUNTER, this);
|
||||
lp_var_t<uint8_t> bootcause = lp_var_t<uint8_t>(sid.objectId, BpxBattery::BOOTCAUSE, this);
|
||||
lp_var_t<int16_t> battTemp4 = lp_var_t<int16_t>(sid.objectId, bpxBat::BATT_TEMP_4, this);
|
||||
lp_var_t<uint32_t> rebootCounter = lp_var_t<uint32_t>(sid.objectId, bpxBat::REBOOT_COUNTER, this);
|
||||
lp_var_t<uint8_t> bootcause = lp_var_t<uint8_t>(sid.objectId, bpxBat::BOOTCAUSE, this);
|
||||
|
||||
private:
|
||||
friend class BpxBatteryHandler;
|
||||
@ -205,16 +202,16 @@ class BpxBatteryHk : public StaticLocalDataSet<BpxBattery::HK_ENTRIES> {
|
||||
* Constructor for data creator
|
||||
* @param hkOwner
|
||||
*/
|
||||
BpxBatteryHk(HasLocalDataPoolIF* hkOwner) : StaticLocalDataSet(hkOwner, BpxBattery::HK_SET_ID) {}
|
||||
BpxBatteryHk(HasLocalDataPoolIF* hkOwner) : StaticLocalDataSet(hkOwner, bpxBat::HK_SET_ID) {}
|
||||
};
|
||||
|
||||
class BpxBatteryCfg : public StaticLocalDataSet<BpxBattery::CFG_ENTRIES> {
|
||||
class BpxBatteryCfg : public StaticLocalDataSet<bpxBat::CFG_ENTRIES> {
|
||||
public:
|
||||
/**
|
||||
* Constructor for data users
|
||||
* @param gyroId
|
||||
*/
|
||||
BpxBatteryCfg(object_id_t bpxId) : StaticLocalDataSet(sid_t(bpxId, BpxBattery::CFG_SET_ID)) {
|
||||
BpxBatteryCfg(object_id_t bpxId) : StaticLocalDataSet(sid_t(bpxId, bpxBat::CFG_SET_ID)) {
|
||||
setAllVariablesReadOnly();
|
||||
}
|
||||
|
||||
@ -230,13 +227,12 @@ class BpxBatteryCfg : public StaticLocalDataSet<BpxBattery::CFG_ENTRIES> {
|
||||
|
||||
//! Mode for battheater [0=OFF,1=Auto]
|
||||
lp_var_t<uint8_t> battheatermode =
|
||||
lp_var_t<uint8_t>(sid.objectId, BpxBattery::BATTERY_HEATER_MODE, this);
|
||||
lp_var_t<uint8_t>(sid.objectId, bpxBat::BATTERY_HEATER_MODE, this);
|
||||
//! Turn heater on at [degC]
|
||||
lp_var_t<int8_t> battheaterLow =
|
||||
lp_var_t<int8_t>(sid.objectId, BpxBattery::BATTHEAT_LOW_LIMIT, this);
|
||||
lp_var_t<int8_t> battheaterLow = lp_var_t<int8_t>(sid.objectId, bpxBat::BATTHEAT_LOW_LIMIT, this);
|
||||
//! Turn heater off at [degC]
|
||||
lp_var_t<int8_t> battheaterHigh =
|
||||
lp_var_t<int8_t>(sid.objectId, BpxBattery::BATTHEAT_HIGH_LIMIT, this);
|
||||
lp_var_t<int8_t>(sid.objectId, bpxBat::BATTHEAT_HIGH_LIMIT, this);
|
||||
|
||||
private:
|
||||
friend class BpxBatteryHandler;
|
||||
@ -244,8 +240,7 @@ class BpxBatteryCfg : public StaticLocalDataSet<BpxBattery::CFG_ENTRIES> {
|
||||
* Constructor for data creator
|
||||
* @param hkOwner
|
||||
*/
|
||||
BpxBatteryCfg(HasLocalDataPoolIF* hkOwner)
|
||||
: StaticLocalDataSet(hkOwner, BpxBattery::CFG_SET_ID) {}
|
||||
BpxBatteryCfg(HasLocalDataPoolIF* hkOwner) : StaticLocalDataSet(hkOwner, bpxBat::CFG_SET_ID) {}
|
||||
};
|
||||
|
||||
#endif /* MISSION_POWER_BPXBATTDEFS_H_ */
|
||||
|
Reference in New Issue
Block a user