mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
283 minor cleanup
This commit is contained in:
parent
8b3d60abe7
commit
74c1ff3d6d
1 changed files with 0 additions and 12 deletions
|
|
@ -102,23 +102,11 @@ bool PromicroSensorManager::begin() {
|
|||
}
|
||||
|
||||
bool PromicroSensorManager::querySensors(uint8_t requester_permissions, CayenneLPP& telemetry) {
|
||||
// TODO: what is the correct permission here?
|
||||
if (requester_permissions && TELEM_PERM_ENVIRONMENT) {
|
||||
if (INA3221initialized) {
|
||||
for(int i = 0; i < 3; i++) {
|
||||
// add only enabled INA3221 channels to telemetry
|
||||
if (INA3221_CHANNEL_ENABLED[i]) {
|
||||
// TODO: remove when telemetry support gets properly added
|
||||
// Serial.print("CH");
|
||||
// Serial.print(i);
|
||||
// Serial.print(" Voltage: ");
|
||||
// Serial.print(INA_3221.getBusVoltage(i));
|
||||
// Serial.print("V Current: ");
|
||||
// Serial.print(INA_3221.getCurrent(i));
|
||||
// Serial.print("A Power: ");
|
||||
// Serial.print(INA_3221.getPower(i));
|
||||
// Serial.println();
|
||||
|
||||
telemetry.addVoltage(INA3221_CHANNELS[i], INA_3221.getBusVoltage(i));
|
||||
telemetry.addCurrent(INA3221_CHANNELS[i], INA_3221.getCurrent(i));
|
||||
telemetry.addPower(INA3221_CHANNELS[i], INA_3221.getPower(i));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue