Merge remote-tracking branch 'origin/develop' into mueller/system-subsystems
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
This commit is contained in:
commit
72acab599a
@ -593,6 +593,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
||||
#if OBSW_DEBUG_ACS == 1
|
||||
mgmLis3Handler->enablePeriodicPrintouts(true, 10);
|
||||
#endif
|
||||
|
||||
spiCookie =
|
||||
new SpiCookie(addresses::MGM_1_RM3100, gpioIds::MGM_1_RM3100_CS, spiDev,
|
||||
RM3100::MAX_BUFFER_SIZE, spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
|
||||
@ -606,6 +607,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
||||
#if OBSW_DEBUG_ACS == 1
|
||||
mgmRm3100Handler->enablePeriodicPrintouts(true, 10);
|
||||
#endif
|
||||
|
||||
spiCookie =
|
||||
new SpiCookie(addresses::MGM_2_LIS3, gpioIds::MGM_2_LIS3_CS, spiDev,
|
||||
MGMLIS3MDL::MAX_BUFFER_SIZE, spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
|
||||
@ -631,6 +633,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
||||
#if OBSW_DEBUG_ACS == 1
|
||||
mgmRm3100Handler->enablePeriodicPrintouts(true, 10);
|
||||
#endif
|
||||
|
||||
// Commented until ACS board V2 in in clean room again
|
||||
// Gyro 0 Side A
|
||||
spiCookie = new SpiCookie(addresses::GYRO_0_ADIS, gpioIds::GYRO_0_ADIS_CS, spiDev,
|
||||
@ -661,6 +664,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
||||
#if OBSW_DEBUG_ACS == 1
|
||||
gyroL3gHandler->enablePeriodicPrintouts(true, 10);
|
||||
#endif
|
||||
|
||||
// Gyro 2 Side B
|
||||
spiCookie = new SpiCookie(addresses::GYRO_2_ADIS, gpioIds::GYRO_2_ADIS_CS, spiDev,
|
||||
ADIS1650X::MAXIMUM_REPLY_SIZE, spi::DEFAULT_ADIS16507_MODE,
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define BSP_Q7S_XADC_XADC_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
|
||||
|
||||
namespace xadc {
|
||||
|
@ -38,9 +38,9 @@ debugging. */
|
||||
|
||||
#define OBSW_USE_CCSDS_IP_CORE 1
|
||||
// Set to 1 if all telemetry should be sent to the PTME IP Core
|
||||
#define OBSW_TM_TO_PTME 1
|
||||
#define OBSW_TM_TO_PTME 0
|
||||
// Set to 1 if telecommands are received via the PDEC IP Core
|
||||
#define OBSW_TC_FROM_PDEC 1
|
||||
#define OBSW_TC_FROM_PDEC 0
|
||||
|
||||
#define OBSW_ENABLE_TIMERS 1
|
||||
#define OBSW_INITIALIZE_SWITCHES 1
|
||||
@ -53,7 +53,7 @@ debugging. */
|
||||
#define OBSW_ADD_ACS_BOARD 1
|
||||
#define OBSW_ADD_ACS_HANDLERS 1
|
||||
#define OBSW_ADD_RW 0
|
||||
#define OBSW_ADD_RTD_DEVICES 0
|
||||
#define OBSW_ADD_RTD_DEVICES 1
|
||||
#define OBSW_ADD_TMP_DEVICES 0
|
||||
#define OBSW_ADD_RAD_SENSORS 0
|
||||
#define OBSW_ADD_PL_PCDU 0
|
||||
@ -61,7 +61,13 @@ debugging. */
|
||||
#define OBSW_ENABLE_SYRLINKS_TRANSMIT_TIMEOUT 0
|
||||
#define OBSW_STAR_TRACKER_GROUND_CONFIG 1
|
||||
#define OBSW_ENABLE_PERIODIC_HK 0
|
||||
#define OBSW_PRINT_CORE_HK 0
|
||||
|
||||
// This is a really tricky switch.. It initializes the PCDU switches to their default states
|
||||
// at powerup. I think it would be better
|
||||
// to leave it off for now. It makes testing a lot more difficult and it might mess with
|
||||
// something the operators might want to do by giving the software too much intelligence
|
||||
// at the wrong place. The system component might command all the Switches accordingly anyway
|
||||
#define OBSW_INITIALIZE_SWITCHES 0
|
||||
|
||||
#endif
|
||||
|
||||
@ -98,16 +104,19 @@ debugging. */
|
||||
#define OBSW_DEBUG_RAD_SENSOR 0
|
||||
#define OBSW_TEST_PL_PCDU 0
|
||||
#define OBSW_DEBUG_PL_PCDU 0
|
||||
#define OBSW_TEST_BPX_BATT 0
|
||||
#define OBSW_DEBUG_BPX_BATT 0
|
||||
|
||||
#define OBSW_TEST_LIBGPIOD 0
|
||||
#define OBSW_TEST_PLOC_HANDLER 0
|
||||
#define OBSW_TEST_BPX_BATT 0
|
||||
#define OBSW_TEST_CCSDS_BRIDGE 0
|
||||
#define OBSW_TEST_CCSDS_PTME 0
|
||||
#define OBSW_TEST_TE7020_HEATER 0
|
||||
#define OBSW_TEST_GPIO_OPEN_BY_LABEL 0
|
||||
#define OBSW_TEST_GPIO_OPEN_BY_LINE_NAME 0
|
||||
#define OBSW_DEBUG_P60DOCK 0
|
||||
#define OBSW_DEBUG_BPX_BATT 0
|
||||
|
||||
#define OBSW_PRINT_CORE_HK 0
|
||||
#define OBSW_DEBUG_PDU1 0
|
||||
#define OBSW_DEBUG_PDU2 0
|
||||
#define OBSW_DEBUG_GPS 0
|
||||
|
@ -32,6 +32,13 @@ ReturnValue_t pst::pstGpio(FixedTimeslotTaskIF *thisSequence) {
|
||||
ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
|
||||
uint32_t length = thisSequence->getPeriodMs();
|
||||
static_cast<void>(length);
|
||||
#if OBSW_ADD_PL_PCDU == 1
|
||||
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0.4, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0.6, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||
#endif
|
||||
#if OBSW_ADD_TMP_DEVICES == 1
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_1, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_2, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
@ -424,17 +431,7 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
|
||||
}
|
||||
#endif /* OBSW_ADD_ACS_BOARD == 1 && OBSW_ADD_ACS_HANDLERS == 1 */
|
||||
|
||||
ReturnValue_t seqCheck = thisSequence->checkSequence();
|
||||
if (seqCheck != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (seqCheck == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
||||
sif::warning << "SPI PST is empty.." << std::endl;
|
||||
} else {
|
||||
sif::error << "SPI PST initialization failed" << std::endl;
|
||||
}
|
||||
|
||||
return seqCheck;
|
||||
}
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
return thisSequence->checkSequence();
|
||||
}
|
||||
|
||||
ReturnValue_t pst::pstI2c(FixedTimeslotTaskIF *thisSequence) {
|
||||
@ -456,11 +453,7 @@ ReturnValue_t pst::pstI2c(FixedTimeslotTaskIF *thisSequence) {
|
||||
thisSequence->addSlot(objects::BPX_BATT_HANDLER, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||
#endif
|
||||
static_cast<void>(length);
|
||||
if (thisSequence->checkSequence() != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::error << "I2C PST initialization failed" << std::endl;
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
return thisSequence->checkSequence();
|
||||
}
|
||||
|
||||
ReturnValue_t pst::pstUart(FixedTimeslotTaskIF *thisSequence) {
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include "GomspaceDeviceHandler.h"
|
||||
|
||||
#include <common/config/commonObjects.h>
|
||||
|
||||
#include "devicedefinitions/GomSpacePackets.h"
|
||||
#include "devicedefinitions/powerDefinitions.h"
|
||||
|
||||
@ -72,7 +74,8 @@ ReturnValue_t GomspaceDeviceHandler::buildCommandFromCommand(DeviceCommandId_t d
|
||||
}
|
||||
break;
|
||||
}
|
||||
case (GOMSPACE::PRINT_SWITCH_V_I): {
|
||||
case (GOMSPACE::PRINT_SWITCH_V_I):
|
||||
case (GOMSPACE::PRINT_LATCHUPS): {
|
||||
result = printStatus(deviceCommand);
|
||||
break;
|
||||
}
|
||||
@ -97,6 +100,7 @@ void GomspaceDeviceHandler::fillCommandAndReplyMap() {
|
||||
this->insertInCommandAndReplyMap(GOMSPACE::REQUEST_HK_TABLE, 3);
|
||||
this->insertInCommandMap(GOMSPACE::GNDWDT_RESET);
|
||||
this->insertInCommandMap(GOMSPACE::PRINT_SWITCH_V_I);
|
||||
this->insertInCommandMap(GOMSPACE::PRINT_LATCHUPS);
|
||||
}
|
||||
|
||||
ReturnValue_t GomspaceDeviceHandler::scanForReply(const uint8_t* start, size_t remainingSize,
|
||||
@ -192,7 +196,8 @@ ReturnValue_t GomspaceDeviceHandler::generateSetParamCommand(const uint8_t* comm
|
||||
ReturnValue_t result =
|
||||
setParamCacher.deSerialize(&commandData, &commandDataLen, SerializeIF::Endianness::BIG);
|
||||
// This breaks layering but I really don't want to accept this command..
|
||||
if (setParamCacher.getAddress() == PDU2::CONFIG_ADDRESS_OUT_EN_Q7S) {
|
||||
if (setParamCacher.getAddress() == PDU2::CONFIG_ADDRESS_OUT_EN_Q7S and
|
||||
this->getObjectId() == objects::PDU2_HANDLER) {
|
||||
triggerEvent(power::SWITCHING_Q7S_DENIED, 0, 0);
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
|
@ -217,9 +217,10 @@ void P60DockHandler::parseHkTableReply(const uint8_t *packet) {
|
||||
p60dockHkTableDataset.latchupsGS3V3 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||
dataOffset += 4;
|
||||
|
||||
p60dockHkTableDataset.vbatVoltageValue = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||
p60dockHkTableDataset.dockVbatVoltageValue =
|
||||
*(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||
dataOffset += 4;
|
||||
p60dockHkTableDataset.vccCurrent = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||
p60dockHkTableDataset.dockVccCurrent = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||
dataOffset += 4;
|
||||
p60dockHkTableDataset.batteryCurrent = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||
dataOffset += 4;
|
||||
@ -444,63 +445,113 @@ ReturnValue_t P60DockHandler::initializeLocalDataPool(localpool::DataPool &local
|
||||
}
|
||||
|
||||
ReturnValue_t P60DockHandler::printStatus(DeviceCommandId_t cmd) {
|
||||
ReturnValue_t result = RETURN_OK;
|
||||
switch (cmd) {
|
||||
case (GOMSPACE::PRINT_SWITCH_V_I): {
|
||||
PoolReadGuard pg(&p60dockHkTableDataset);
|
||||
ReturnValue_t readResult = pg.getReadResult();
|
||||
if (readResult != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::warning << "Reading PDU1 HK table failed!" << std::endl;
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
result = pg.getReadResult();
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
break;
|
||||
}
|
||||
printHkTableSwitchIV();
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
case (GOMSPACE::PRINT_LATCHUPS): {
|
||||
PoolReadGuard pg(&p60dockHkTableDataset);
|
||||
result = pg.getReadResult();
|
||||
printHkTableLatchups();
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
break;
|
||||
}
|
||||
printHkTable();
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
default: {
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
}
|
||||
sif::warning << "Reading P60 Dock HK table failed" << std::endl;
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
|
||||
void P60DockHandler::printHkTable() {
|
||||
sif::info << "P60 Dock Info: SwitchState, Currents [mA], Voltages [mV]" << std::endl;
|
||||
|
||||
sif::info << std::setw(30) << std::left << "ACU VCC" << std::dec << "| "
|
||||
void P60DockHandler::printHkTableSwitchIV() {
|
||||
sif::info << "P60 Dock Info:" << std::endl;
|
||||
sif::info << "Boot Cause: " << p60dockHkTableDataset.bootcause
|
||||
<< " | Boot Count: " << std::setw(4) << std::right << p60dockHkTableDataset.bootCount
|
||||
<< std::endl;
|
||||
sif::info << "Reset Cause: " << p60dockHkTableDataset.resetcause
|
||||
<< " | Battery Mode: " << static_cast<int>(p60dockHkTableDataset.battMode.value)
|
||||
<< std::endl;
|
||||
sif::info << "SwitchState, Currents [mA], Voltages [mV]:" << std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "Dock VBAT VCC" << std::dec
|
||||
<< "| -, " << std::setw(4) << std::right << p60dockHkTableDataset.dockVccCurrent << ", "
|
||||
<< std::setw(5) << p60dockHkTableDataset.dockVbatVoltageValue << std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "BATT" << std::dec << "| -, "
|
||||
<< std::setw(4) << std::right << p60dockHkTableDataset.batteryCurrent.value << ", "
|
||||
<< std::setw(5) << p60dockHkTableDataset.batteryVoltage.value << std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "ACU VCC" << std::dec << "| "
|
||||
<< unsigned(p60dockHkTableDataset.outputEnableStateAcuVcc.value) << ", " << std::setw(4)
|
||||
<< std::right << p60dockHkTableDataset.currentAcuVcc.value << ", " << std::setw(5)
|
||||
<< p60dockHkTableDataset.voltageAcuVcc.value << std::endl;
|
||||
sif::info << std::setw(30) << std::left << "ACU VBAT" << std::dec << "| "
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "ACU VBAT" << std::dec << "| "
|
||||
<< unsigned(p60dockHkTableDataset.outputEnableStateAcuVbat.value) << ", "
|
||||
<< std::setw(4) << std::right << p60dockHkTableDataset.currentAcuVbat.value << ", "
|
||||
<< std::setw(5) << p60dockHkTableDataset.voltageAcuVbat.value << std::endl;
|
||||
|
||||
sif::info << std::setw(30) << std::left << "PDU1 VCC" << std::dec << "| "
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "PDU1 VCC" << std::dec << "| "
|
||||
<< unsigned(p60dockHkTableDataset.outputEnableStatePdu1Vcc.value) << ", "
|
||||
<< std::setw(4) << std::right << p60dockHkTableDataset.currentPdu1Vcc.value << ", "
|
||||
<< std::setw(5) << p60dockHkTableDataset.voltagePdu1Vcc.value << std::endl;
|
||||
sif::info << std::setw(30) << std::left << "PDU1 VBAT" << std::dec << "| "
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "PDU1 VBAT" << std::dec << "| "
|
||||
<< unsigned(p60dockHkTableDataset.outputEnableStatePdu1Vbat.value) << ", "
|
||||
<< std::setw(4) << std::right << p60dockHkTableDataset.currentPdu1Vbat.value << ", "
|
||||
<< std::setw(5) << p60dockHkTableDataset.voltagePdu1Vbat.value << std::endl;
|
||||
|
||||
sif::info << std::setw(30) << std::left << "PDU2 VCC" << std::dec << "| "
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "PDU2 VCC" << std::dec << "| "
|
||||
<< unsigned(p60dockHkTableDataset.outputEnableStatePdu2Vcc.value) << ", "
|
||||
<< std::setw(4) << std::right << p60dockHkTableDataset.currentPdu2Vcc.value << ", "
|
||||
<< std::setw(5) << p60dockHkTableDataset.voltagePdu2Vcc.value << std::endl;
|
||||
sif::info << std::setw(30) << std::left << "PDU2 VBAT" << std::dec << "| "
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "PDU2 VBAT" << std::dec << "| "
|
||||
<< unsigned(p60dockHkTableDataset.outputEnableStatePdu2Vbat.value) << ", "
|
||||
<< std::setw(4) << std::right << p60dockHkTableDataset.currentPdu2Vbat.value << ", "
|
||||
<< std::setw(5) << p60dockHkTableDataset.voltagePdu2Vbat.value << std::endl;
|
||||
|
||||
sif::info << std::setw(30) << std::left << "Stack VBAT" << std::dec << "| "
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "Stack VBAT" << std::dec << "| "
|
||||
<< unsigned(p60dockHkTableDataset.outputEnableStateStackVbat.value) << ", "
|
||||
<< std::setw(4) << std::right << p60dockHkTableDataset.currentStackVbat.value << ", "
|
||||
<< std::setw(5) << p60dockHkTableDataset.voltageStackVbat.value << std::endl;
|
||||
sif::info << std::setw(30) << std::left << "Stack 3V3" << std::dec << "| "
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "Stack 3V3" << std::dec << "| "
|
||||
<< unsigned(p60dockHkTableDataset.outputEnableStateStack3V3.value) << ", "
|
||||
<< std::setw(4) << std::right << p60dockHkTableDataset.currentStack3V3.value << ", "
|
||||
<< std::setw(5) << p60dockHkTableDataset.voltageStack3V3.value << std::endl;
|
||||
sif::info << std::setw(30) << std::left << "Stack 5V" << std::dec << "| "
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "Stack 5V" << std::dec << "| "
|
||||
<< unsigned(p60dockHkTableDataset.outputEnableStateStack5V.value) << ", "
|
||||
<< std::setw(4) << std::right << p60dockHkTableDataset.currentStack5V.value << ", "
|
||||
<< std::setw(5) << p60dockHkTableDataset.voltageStack5V.value << std::endl;
|
||||
}
|
||||
|
||||
void P60DockHandler::printHkTableLatchups() {
|
||||
sif::info << "P60 Latchup Information" << std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "ACU VCC" << std::dec << "| "
|
||||
<< std::setw(4) << std::right << p60dockHkTableDataset.latchupsAcuVcc << std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "ACU VBAT" << std::dec << "| "
|
||||
<< std::setw(4) << std::right << p60dockHkTableDataset.latchupsAcuVbat << std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "PDU1 VCC" << std::dec << "| "
|
||||
<< std::setw(4) << std::right << p60dockHkTableDataset.latchupsPdu1Vcc << std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "PDU1 VBAT" << std::dec << "| "
|
||||
<< std::setw(4) << std::right << p60dockHkTableDataset.latchupsPdu1Vbat << std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "PDU2 VCC" << std::dec << "| "
|
||||
<< std::setw(4) << std::right << p60dockHkTableDataset.latchupsPdu2Vcc << std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "PDU2 VBAT" << std::dec << "| "
|
||||
<< std::setw(4) << std::right << p60dockHkTableDataset.latchupsPdu2Vbat << std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "Stack 3V3" << std::dec << "| "
|
||||
<< std::setw(4) << std::right << p60dockHkTableDataset.latchupsStack3V3 << std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "Stack 5V" << std::dec << "| "
|
||||
<< std::setw(4) << std::right << p60dockHkTableDataset.latchupsStack5V << std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "GS 3V3" << std::dec << "| "
|
||||
<< std::setw(4) << std::right << p60dockHkTableDataset.latchupsGS3V3 << std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "GS 5V" << std::dec << "| "
|
||||
<< std::setw(4) << std::right << p60dockHkTableDataset.latchupsGS5V << std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "X3 VBAT" << std::dec << "| "
|
||||
<< std::setw(4) << std::right << p60dockHkTableDataset.latchupsX3IdleVbat << std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "X3 VCC" << std::dec << "| "
|
||||
<< std::setw(4) << std::right << p60dockHkTableDataset.latchupsX3IdleVcc << std::endl;
|
||||
}
|
||||
|
@ -32,10 +32,12 @@ class P60DockHandler : public GomspaceDeviceHandler {
|
||||
*/
|
||||
ReturnValue_t printStatus(DeviceCommandId_t cmd) override;
|
||||
|
||||
void printHkTable();
|
||||
void printHkTableSwitchIV();
|
||||
void printHkTableLatchups();
|
||||
|
||||
private:
|
||||
P60Dock::HkTableDataset p60dockHkTableDataset;
|
||||
static constexpr uint8_t MAX_CHANNEL_STR_WIDTH = 16;
|
||||
|
||||
/**
|
||||
* @brief Function extracts the hk table information from the received csp packet and stores
|
||||
|
@ -14,8 +14,9 @@ PCDUHandler::PCDUHandler(object_id_t setObjectId, size_t cmdQueueSize)
|
||||
pdu2HkTableDataset(this),
|
||||
pdu1HkTableDataset(this),
|
||||
cmdQueueSize(cmdQueueSize) {
|
||||
auto mqArgs = MqArgs(setObjectId, static_cast<void*>(this));
|
||||
commandQueue = QueueFactory::instance()->createMessageQueue(
|
||||
cmdQueueSize, MessageQueueMessage::MAX_MESSAGE_SIZE);
|
||||
cmdQueueSize, MessageQueueMessage::MAX_MESSAGE_SIZE, &mqArgs);
|
||||
pwrMutex = MutexFactory::instance()->createMutex();
|
||||
}
|
||||
|
||||
|
@ -412,30 +412,51 @@ ReturnValue_t PDU1Handler::initializeLocalDataPool(localpool::DataPool &localDat
|
||||
localDataPoolMap.emplace(P60System::PDU1_WDT_CAN_LEFT, new PoolEntry<uint32_t>({0}));
|
||||
localDataPoolMap.emplace(P60System::PDU1_WDT_CSP_LEFT1, new PoolEntry<uint8_t>({0}));
|
||||
localDataPoolMap.emplace(P60System::PDU1_WDT_CSP_LEFT2, new PoolEntry<uint8_t>({0}));
|
||||
|
||||
#if OBSW_ENABLE_PERIODIC_HK == 1
|
||||
poolManager.subscribeForPeriodicPacket(pdu1HkTableDataset.getSid(), false, 0.4, true);
|
||||
#endif
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
ReturnValue_t PDU1Handler::printStatus(DeviceCommandId_t cmd) {
|
||||
ReturnValue_t result = RETURN_OK;
|
||||
switch (cmd) {
|
||||
case (GOMSPACE::PRINT_SWITCH_V_I): {
|
||||
PoolReadGuard pg(&pdu1HkTableDataset);
|
||||
ReturnValue_t readResult = pg.getReadResult();
|
||||
if (readResult != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::warning << "Reading PDU1 HK table failed!" << std::endl;
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
result = pg.getReadResult();
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
break;
|
||||
}
|
||||
printHkTable();
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
printHkTableSwitchVI();
|
||||
break;
|
||||
}
|
||||
case (GOMSPACE::PRINT_LATCHUPS): {
|
||||
PoolReadGuard pg(&pdu1HkTableDataset);
|
||||
result = pg.getReadResult();
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
break;
|
||||
}
|
||||
printHkTableLatchups();
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
}
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::warning << "Reading PDU1 HK table failed!" << std::endl;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void PDU1Handler::printHkTable() {
|
||||
sif::info << "PDU1 Info: SwitchState, Currents [mA], Voltages [mV]" << std::endl;
|
||||
void PDU1Handler::printHkTableSwitchVI() {
|
||||
sif::info << "PDU1 Info: " << std::endl;
|
||||
sif::info << "Boot Cause: " << pdu1HkTableDataset.bootcause << " | Boot Count: " << std::setw(4)
|
||||
<< std::right << pdu1HkTableDataset.bootcount << std::endl;
|
||||
sif::info << "Reset Cause: " << pdu1HkTableDataset.resetcause
|
||||
<< " | Battery Mode: " << static_cast<int>(pdu1HkTableDataset.battMode.value)
|
||||
<< std::endl;
|
||||
sif::info << "SwitchState, Currents [mA], Voltages [mV]:" << std::endl;
|
||||
sif::info << std::setw(30) << std::left << "TCS Board" << std::dec << "| "
|
||||
<< unsigned(pdu1HkTableDataset.outEnabledTCSBoard3V3.value) << ", " << std::setw(4)
|
||||
<< std::right << pdu1HkTableDataset.currentOutTCSBoard3V3.value << ", " << std::setw(4)
|
||||
@ -475,3 +496,26 @@ void PDU1Handler::printHkTable() {
|
||||
<< std::setw(4) << pdu1HkTableDataset.voltageOutChannel8.value << std::right
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
void PDU1Handler::printHkTableLatchups() {
|
||||
sif::info << "PDU1 Latchup Information" << std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "TCS Board" << std::dec << "| "
|
||||
<< std::setw(4) << std::right << pdu1HkTableDataset.latchupsTcsBoard3V3 << std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "Syrlinks" << std::dec << "| "
|
||||
<< std::setw(4) << std::right << pdu1HkTableDataset.latchupsSyrlinks << std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "Star Tracker" << std::dec << "| "
|
||||
<< std::setw(4) << std::right << pdu1HkTableDataset.latchupsStarTracker << std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "MGT" << std::dec << "| "
|
||||
<< std::setw(4) << std::right << pdu1HkTableDataset.latchupsMgt << std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "SuS Nominal" << std::dec << "| "
|
||||
<< std::setw(4) << std::right << pdu1HkTableDataset.latchupsSusNominal << std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "Solar Cell Experiment" << std::dec
|
||||
<< "| " << std::setw(4) << std::right << pdu1HkTableDataset.latchupsSolarCellExp
|
||||
<< std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "PLOC" << std::dec << "| "
|
||||
<< std::setw(4) << std::right << pdu1HkTableDataset.latchupsPloc << std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "ACS A Side" << std::dec << "| "
|
||||
<< std::setw(4) << std::right << pdu1HkTableDataset.latchupsAcsBoardSideA << std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "Channel 8" << std::dec << "| "
|
||||
<< std::setw(4) << std::right << pdu1HkTableDataset.latchupsChannel8 << std::endl;
|
||||
}
|
||||
|
@ -40,12 +40,15 @@ class PDU1Handler : public GomspaceDeviceHandler {
|
||||
ReturnValue_t setParamCallback(SetParamMessageUnpacker& unpacker, bool afterExectuion) override;
|
||||
|
||||
private:
|
||||
static constexpr uint8_t MAX_CHANNEL_STR_WIDTH = 24;
|
||||
|
||||
/** Dataset for the housekeeping table of the PDU1 */
|
||||
PDU1::PDU1HkTableDataset pdu1HkTableDataset;
|
||||
GOMSPACE::ChannelSwitchHook channelSwitchHook = nullptr;
|
||||
void* hookArgs = nullptr;
|
||||
|
||||
void printHkTable();
|
||||
void printHkTableSwitchVI();
|
||||
void printHkTableLatchups();
|
||||
void parseHkTableReply(const uint8_t* packet);
|
||||
};
|
||||
|
||||
|
@ -364,30 +364,51 @@ ReturnValue_t PDU2Handler::initializeLocalDataPool(localpool::DataPool &localDat
|
||||
localDataPoolMap.emplace(P60System::PDU2_WDT_CAN_LEFT, new PoolEntry<uint32_t>({0}));
|
||||
localDataPoolMap.emplace(P60System::PDU2_WDT_CSP_LEFT1, new PoolEntry<uint8_t>({0}));
|
||||
localDataPoolMap.emplace(P60System::PDU2_WDT_CSP_LEFT2, new PoolEntry<uint8_t>({0}));
|
||||
|
||||
#if OBSW_ENABLE_PERIODIC_HK == 1
|
||||
poolManager.subscribeForPeriodicPacket(pdu2HkTableDataset.getSid(), false, 0.4, true);
|
||||
#endif
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
ReturnValue_t PDU2Handler::printStatus(DeviceCommandId_t cmd) {
|
||||
ReturnValue_t result = RETURN_OK;
|
||||
switch (cmd) {
|
||||
case (GOMSPACE::PRINT_SWITCH_V_I): {
|
||||
PoolReadGuard pg(&pdu2HkTableDataset);
|
||||
ReturnValue_t readResult = pg.getReadResult();
|
||||
if (readResult != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::warning << "Reading PDU1 HK table failed!" << std::endl;
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
result = pg.getReadResult();
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
break;
|
||||
}
|
||||
printHkTable();
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
printHkTableSwitchVI();
|
||||
break;
|
||||
}
|
||||
case (GOMSPACE::PRINT_LATCHUPS): {
|
||||
PoolReadGuard pg(&pdu2HkTableDataset);
|
||||
result = pg.getReadResult();
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
break;
|
||||
}
|
||||
printHkTableLatchups();
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
}
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::warning << "Reading PDU1 HK table failed!" << std::endl;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void PDU2Handler::printHkTable() {
|
||||
sif::info << "PDU2 Info: SwitchState, Currents [mA], Voltages [mV]" << std::endl;
|
||||
void PDU2Handler::printHkTableSwitchVI() {
|
||||
sif::info << "PDU2 Info:" << std::endl;
|
||||
sif::info << "Boot Cause: " << pdu2HkTableDataset.bootcause << " | Boot Count: " << std::setw(4)
|
||||
<< std::right << pdu2HkTableDataset.bootcount << std::endl;
|
||||
sif::info << "Reset Cause: " << pdu2HkTableDataset.resetcause
|
||||
<< " | Battery Mode: " << static_cast<int>(pdu2HkTableDataset.battMode.value)
|
||||
<< std::endl;
|
||||
sif::info << "SwitchState, Currents [mA], Voltages [mV]: " << std::endl;
|
||||
sif::info << std::setw(30) << std::left << "Q7S" << std::dec << "| "
|
||||
<< unsigned(pdu2HkTableDataset.outEnabledQ7S.value) << ", " << std::setw(4)
|
||||
<< std::right << pdu2HkTableDataset.currentOutQ7S.value << ", " << std::setw(4)
|
||||
@ -400,11 +421,11 @@ void PDU2Handler::printHkTable() {
|
||||
<< unsigned(pdu2HkTableDataset.outEnabledReactionWheels.value) << ", " << std::setw(4)
|
||||
<< std::right << pdu2HkTableDataset.currentOutReactionWheels.value << ", "
|
||||
<< std::setw(4) << pdu2HkTableDataset.voltageOutReactionWheels.value << std::endl;
|
||||
sif::info << std::setw(30) << std::left << "TCS Board 8V heater input" << std::dec << "| "
|
||||
sif::info << std::setw(30) << std::left << "TCS Board Heater Input" << std::dec << "| "
|
||||
<< unsigned(pdu2HkTableDataset.outEnabledTCSBoardHeaterIn.value) << ", " << std::setw(4)
|
||||
<< std::right << pdu2HkTableDataset.currentOutTCSBoardHeaterIn.value << ", "
|
||||
<< std::setw(4) << pdu2HkTableDataset.voltageOutTCSBoardHeaterIn.value << std::endl;
|
||||
sif::info << std::setw(30) << std::left << "Redundant SUS group" << std::dec << "| "
|
||||
sif::info << std::setw(30) << std::left << "SuS Redundant" << std::dec << "| "
|
||||
<< unsigned(pdu2HkTableDataset.outEnabledSUSRedundant.value) << ", " << std::setw(4)
|
||||
<< std::right << pdu2HkTableDataset.currentOutSUSRedundant.value << ", " << std::setw(4)
|
||||
<< pdu2HkTableDataset.voltageOutSUSRedundant.value << std::endl;
|
||||
@ -420,13 +441,40 @@ void PDU2Handler::printHkTable() {
|
||||
<< unsigned(pdu2HkTableDataset.outEnabledAcsBoardSideB.value) << ", " << std::setw(4)
|
||||
<< std::right << pdu2HkTableDataset.currentOutACSBoardSideB.value << ", "
|
||||
<< std::setw(4) << pdu2HkTableDataset.voltageOutACSBoardSideB.value << std::endl;
|
||||
sif::info << std::setw(30) << std::left << "Payload Camera enable state" << std::dec << "| "
|
||||
sif::info << std::setw(30) << std::left << "Payload Camera" << std::dec << "| "
|
||||
<< unsigned(pdu2HkTableDataset.outEnabledPayloadCamera.value) << ", " << std::setw(4)
|
||||
<< std::right << pdu2HkTableDataset.currentOutPayloadCamera.value << ", "
|
||||
<< std::setw(4) << pdu2HkTableDataset.voltageOutPayloadCamera.value << std::right
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
void PDU2Handler::printHkTableLatchups() {
|
||||
sif::info << "PDU2 Latchup Information" << std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "Q7S" << std::dec << "| "
|
||||
<< std::setw(4) << std::right << pdu2HkTableDataset.latchupsQ7S << std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "Payload PCDU Channel 1" << std::dec
|
||||
<< "| " << std::setw(4) << std::right << pdu2HkTableDataset.latchupsPayloadPcduCh1
|
||||
<< std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "Reaction Wheels" << std::dec
|
||||
<< "| " << std::setw(4) << std::right << pdu2HkTableDataset.latchupsRw << std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "TCS Board Heater Input" << std::dec
|
||||
<< "| " << std::setw(4) << std::right << pdu2HkTableDataset.latchupsTcsBoardHeaterIn
|
||||
<< std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "SuS Nominal" << std::dec << "| "
|
||||
<< std::setw(4) << std::right << pdu2HkTableDataset.latchupsSusRedundant << std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "Deployment mechanism" << std::dec
|
||||
<< "| " << std::setw(4) << std::right << pdu2HkTableDataset.latchupsDeplMenchanism
|
||||
<< std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "Payload PCDU Channel 6" << std::dec
|
||||
<< "| " << std::setw(4) << std::right << pdu2HkTableDataset.latchupsPayloadPcduCh6
|
||||
<< std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "ACS Board Side B" << std::dec
|
||||
<< "| " << std::setw(4) << std::right << pdu2HkTableDataset.latchupsAcsBoardSideB
|
||||
<< std::endl;
|
||||
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "Payload Camera" << std::dec << "| "
|
||||
<< std::setw(4) << std::right << pdu2HkTableDataset.latchupsPayloadCamera << std::endl;
|
||||
}
|
||||
|
||||
ReturnValue_t PDU2Handler::setParamCallback(SetParamMessageUnpacker &unpacker,
|
||||
bool afterExecution) {
|
||||
using namespace PDU2;
|
||||
|
@ -38,12 +38,15 @@ class PDU2Handler : public GomspaceDeviceHandler {
|
||||
ReturnValue_t setParamCallback(SetParamMessageUnpacker& unpacker, bool afterExecution) override;
|
||||
|
||||
private:
|
||||
static constexpr uint8_t MAX_CHANNEL_STR_WIDTH = 24;
|
||||
|
||||
/** Dataset for the housekeeping table of the PDU2 */
|
||||
PDU2::PDU2HkTableDataset pdu2HkTableDataset;
|
||||
GOMSPACE::ChannelSwitchHook channelSwitchHook = nullptr;
|
||||
void* hookArgs = nullptr;
|
||||
|
||||
void printHkTable();
|
||||
void printHkTableSwitchVI();
|
||||
void printHkTableLatchups();
|
||||
|
||||
void parseHkTableReply(const uint8_t* packet);
|
||||
};
|
||||
|
@ -156,6 +156,7 @@ ReturnValue_t RadiationSensorHandler::interpretDeviceReply(DeviceCommandId_t id,
|
||||
#if OBSW_VERBOSE_LEVEL >= 1 && OBSW_DEBUG_RAD_SENSOR == 1
|
||||
sif::info << "Radiation sensor temperature: " << dataset.temperatureCelcius << " °C"
|
||||
<< std::endl;
|
||||
sif::info << std::dec;
|
||||
sif::info << "Radiation sensor ADC value channel 0: " << dataset.ain0 << std::endl;
|
||||
sif::info << "Radiation sensor ADC value channel 1: " << dataset.ain1 << std::endl;
|
||||
sif::info << "Radiation sensor ADC value channel 4: " << dataset.ain4 << std::endl;
|
||||
|
@ -1,16 +1,13 @@
|
||||
#include "SolarArrayDeploymentHandler.h"
|
||||
|
||||
#include <devices/gpioIds.h>
|
||||
#include <devices/powerSwitcherList.h>
|
||||
#include <fsfw/ipc/QueueFactory.h>
|
||||
#include <fsfw/objectmanager/ObjectManager.h>
|
||||
#include <fsfw_hal/common/gpio/GpioCookie.h>
|
||||
|
||||
SolarArrayDeploymentHandler::SolarArrayDeploymentHandler(object_id_t setObjectId_,
|
||||
object_id_t gpioDriverId_,
|
||||
CookieIF* gpioCookie_,
|
||||
object_id_t mainLineSwitcherObjectId_,
|
||||
uint8_t mainLineSwitch_, gpioId_t deplSA1,
|
||||
SolarArrayDeploymentHandler::SolarArrayDeploymentHandler(
|
||||
object_id_t setObjectId_, object_id_t gpioDriverId_, CookieIF* gpioCookie_,
|
||||
object_id_t mainLineSwitcherObjectId_, pcduSwitches::Switches mainLineSwitch_, gpioId_t deplSA1,
|
||||
gpioId_t deplSA2, uint32_t burnTimeMs)
|
||||
: SystemObject(setObjectId_),
|
||||
gpioDriverId(gpioDriverId_),
|
||||
|
@ -1,6 +1,7 @@
|
||||
#ifndef MISSION_DEVICES_SOLARARRAYDEPLOYMENT_H_
|
||||
#define MISSION_DEVICES_SOLARARRAYDEPLOYMENT_H_
|
||||
|
||||
#include <devices/powerSwitcherList.h>
|
||||
#include <fsfw/action/HasActionsIF.h>
|
||||
#include <fsfw/devicehandlers/CookieIF.h>
|
||||
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
|
||||
@ -42,8 +43,8 @@ class SolarArrayDeploymentHandler : public ExecutableObjectIF,
|
||||
*/
|
||||
SolarArrayDeploymentHandler(object_id_t setObjectId, object_id_t gpioDriverId,
|
||||
CookieIF* gpioCookie, object_id_t mainLineSwitcherObjectId,
|
||||
uint8_t mainLineSwitch, gpioId_t deplSA1, gpioId_t deplSA2,
|
||||
uint32_t burnTimeMs);
|
||||
pcduSwitches::Switches mainLineSwitch, gpioId_t deplSA1,
|
||||
gpioId_t deplSA2, uint32_t burnTimeMs);
|
||||
|
||||
virtual ~SolarArrayDeploymentHandler();
|
||||
|
||||
|
@ -34,8 +34,10 @@ static const DeviceCommandId_t GNDWDT_RESET = 9; //!< [EXPORT] : [COMMAND]
|
||||
static const DeviceCommandId_t PARAM_GET = 0; //!< [EXPORT] : [COMMAND]
|
||||
static const DeviceCommandId_t PARAM_SET = 255; //!< [EXPORT] : [COMMAND]
|
||||
static const DeviceCommandId_t REQUEST_HK_TABLE = 16; //!< [EXPORT] : [COMMAND]
|
||||
|
||||
//!< [EXPORT] : [COMMAND] Print switch states, voltages and currents to the console
|
||||
static const DeviceCommandId_t PRINT_SWITCH_V_I = 32;
|
||||
static const DeviceCommandId_t PRINT_LATCHUPS = 33;
|
||||
|
||||
} // namespace GOMSPACE
|
||||
|
||||
@ -535,10 +537,11 @@ class HkTableDataset : public StaticLocalDataSet<HK_TABLE_ENTRIES> {
|
||||
lp_var_t<uint16_t> latchupsGS5V =
|
||||
lp_var_t<uint16_t>(sid.objectId, P60System::P60DOCK_LATCHUP_GS5V, this);
|
||||
|
||||
lp_var_t<uint16_t> vbatVoltageValue =
|
||||
lp_var_t<uint16_t> dockVbatVoltageValue =
|
||||
lp_var_t<uint16_t>(sid.objectId, P60System::P60DOCK_VBAT_VALUE, this);
|
||||
lp_var_t<int16_t> vccCurrent =
|
||||
lp_var_t<int16_t> dockVccCurrent =
|
||||
lp_var_t<int16_t>(sid.objectId, P60System::P60DOCK_VCC_CURRENT_VALUE, this);
|
||||
// Difference between charge and discharge current
|
||||
lp_var_t<int16_t> batteryCurrent =
|
||||
lp_var_t<int16_t>(sid.objectId, P60System::P60DOCK_BATTERY_CURRENT, this);
|
||||
lp_var_t<uint16_t> batteryVoltage =
|
||||
|
@ -65,7 +65,7 @@ void prepareExternallyClockedSingleChannelRead(uint8_t* spiBuf, uint8_t channel,
|
||||
* the first byte (first conversion byte) the the rest of the SPI buffer.
|
||||
* @param spiBuf
|
||||
* @param n Channel number. Example: If the ADC has 6 channels, n will be 5
|
||||
* @param sz
|
||||
* @param sz Will be incremented by amount which should be sent
|
||||
*/
|
||||
void prepareExternallyClockedRead0ToN(uint8_t* spiBuf, uint8_t n, size_t& sz);
|
||||
|
||||
@ -73,7 +73,7 @@ void prepareExternallyClockedRead0ToN(uint8_t* spiBuf, uint8_t n, size_t& sz);
|
||||
* Prepare an externally clocked temperature read. 25 bytes have to be sent
|
||||
* and the raw temperature value will appear on the last 2 bytes of the reply.
|
||||
* @param spiBuf
|
||||
* @param sz
|
||||
* @param sz Will be incremented by amount which should be sent
|
||||
*/
|
||||
void prepareExternallyClockedTemperatureRead(uint8_t* spiBuf, size_t& sz);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user