24 : m_sense_resistance(sense_resistance)
75 <<
"raw bytes: 0x" << std::hex << (uint)v_in_bytes[0] <<
", 0x" << (uint)v_in_bytes[1]
76 <<
", combined word: 0x" << v_in_raw
77 <<
", Vin [V]: " << v_in;
90 TLOG_DEBUG(13) <<
"LTC2945 deltaSense V data - "
91 <<
"raw bytes: 0x" << std::hex << (uint)v_bytes[0] <<
", 0x" << (uint)v_bytes[1]
92 <<
", combined word: 0x" << v_raw
93 <<
", detlaSense V [mV]: " <<
v*1000;
103 uint32_t power_raw =
combine_power_data(power_bytes[0], power_bytes[1], power_bytes[2]);
107 <<
"raw bytes: 0x" << std::hex << (uint)power_bytes[0] <<
", 0x" << (uint)power_bytes[1] <<
", 0x" << (uint)power_bytes[2]
108 <<
", combined word: 0x" << power_raw
109 <<
", power [mW]: " << power*1000;
118 uint16_t adc = (uint16_t)msb_byte << 4;
119 adc = adc | (lsb_byte >> 4);
128 uint32_t power = (uint32_t)msb_byte_2 << 16;
129 power = power | ((uint16_t)msb_byte_1 << 8);
130 power = power | lsb_byte;
std::vector< uint8_t > read_i2cArray_atomic(uint32_t i2c_reg_address, uint32_t number_of_words) const
static constexpr float delta_sense_v_resolution
static uint32_t combine_power_data(uint8_t msb_byte_2, uint8_t msb_byte_1, uint8_t lsb_byte)
LTC2945Node(const I2CMasterNode *i2c_master, uint8_t i2c_device_address, double sense_resistance)
double read_power() const
Read power [W].
double read_v_in() const
Read V in [V].
static uint16_t combine_adc_data(uint8_t msb_byte, uint8_t lsb_byte)
double m_sense_resistance
static constexpr float v_in_resolution
double read_delta_sense_v() const
Read delta sense voltage [V].
#define TLOG_DEBUG(lvl,...)