biggest changes possible
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
|
||||
#include <mission/controller/PowerController.h>
|
||||
|
||||
PowerController::PowerController(object_id_t objectId, bool enableHkSets)
|
||||
@@ -89,6 +88,9 @@ void PowerController::performControlOperation() {
|
||||
// if (mode != MODE_OFF) {
|
||||
sif::debug << "oh shit, now i gotta do something" << std::endl;
|
||||
calculateStateOfCharge();
|
||||
if (mode == MODE_NORMAL) {
|
||||
watchStateOfCharge();
|
||||
}
|
||||
// do something
|
||||
//}
|
||||
break;
|
||||
@@ -204,9 +206,13 @@ void PowerController::calculateStateOfCharge() {
|
||||
}
|
||||
}
|
||||
|
||||
void PowerController::watchStateOfCharge() {
|
||||
// ToDo: FDIR
|
||||
}
|
||||
|
||||
ReturnValue_t PowerController::calculateOpenCircuitVoltageCharge() {
|
||||
float vBatCorrected = p60CoreHk.batteryVoltage.value - iBat * batteryInternalResistance;
|
||||
uint8_t lookUpTableIdx = 99;
|
||||
uint8_t lookUpTableIdx = LOOK_UP_TABLE_MAX_IDX;
|
||||
ReturnValue_t result = lookUpTableOcvIdxFinder(vBatCorrected, lookUpTableIdx);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
@@ -289,7 +295,7 @@ ReturnValue_t PowerController::lookUpTableOcvIdxFinder(float voltage, uint8_t &i
|
||||
}
|
||||
|
||||
ReturnValue_t PowerController::calculateCoulombCounterChargeUpperThreshold() {
|
||||
uint8_t lookUpTableIdx = 99;
|
||||
uint8_t lookUpTableIdx = LOOK_UP_TABLE_MAX_IDX;
|
||||
ReturnValue_t result =
|
||||
lookUpTableOcvIdxFinder(coulombCounterVoltageUpperThreshold, lookUpTableIdx);
|
||||
if (result != returnvalue::OK) {
|
||||
|
||||
Reference in New Issue
Block a user