Skip to content

Add ADS1X15 voltage metrics #711

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions meshtastic/telemetry.proto
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,56 @@ message PowerMetrics {
* Current (Ch3)
*/
optional float ch3_current = 6;

/*
* Voltage (Ch4)
*/
optional float ch4_voltage = 7;

/*
* Current (Ch4)
*/
optional float ch4_current = 8;

/*
* Voltage (Ch5)
*/
optional float ch5_voltage = 9;

/*
* Current (Ch5)
*/
optional float ch5_current = 10;

/*
* Voltage (Ch6)
*/
optional float ch6_voltage = 11;

/*
* Current (Ch6)
*/
optional float ch6_current = 12;

/*
* Voltage (Ch7)
*/
optional float ch7_voltage = 13;

/*
* Current (Ch7)
*/
optional float ch7_current = 14;

/*
* Voltage (Ch8)
*/
optional float ch8_voltage = 15;

/*
* Current (Ch8)
*/
optional float ch8_current = 16;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we define the Current for Channel 4 as well, and add the remaining channels 5 to 8 in one PR? So all 8 channels are set up identical.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! Although to avoid overloading this with a very specific ADC, would there be maybe a better approach to avoid repeating these metrics?

I was thinking maybe something like:

message AnalogMetrics {
    repeated float voltage = 1;
}

Copy link
Author

@oscgonfer oscgonfer Jun 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can always just to this for now and tackle this later.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All done @caveman99


/*
Expand Down Expand Up @@ -652,6 +702,11 @@ enum TelemetrySensorType {
* PCT2075 Temperature Sensor
*/
PCT2075 = 39;

/*
* ADS1X15 ADC
*/
ADS1X15 = 40;
}

/*
Expand Down