Add ADS1X15 voltage metrics#711
Conversation
|
@caveman99 - I am not able to allow you for editing the PR because of this: https://github.com/orgs/community/discussions/5634 |
| * Voltage (Ch4) | ||
| */ | ||
| optional float ch4_voltage = 7; | ||
| } |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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;
}
There was a problem hiding this comment.
I can always just to this for now and tackle this later.
There was a problem hiding this comment.
message AnalogMetrics { repeated float voltage = 1; }
That would require a max size definition in the options file, since we can't handle infinite repeated fields. we need to check for the max mtu size during compile time.
ADS1X15 ADCs are 4-channel I2C ADCs with configurable I2C Addresses. This PR adds the SensorType and created an additional channel for it in the PowerMetrics` protobuf.
What does this PR do?
This PR adds the
TelemetrySensorTypeand creates an additional channel for it in thePowerMetricsprotobuf.This, is however incomplete: the problem being that up to 4x ADS1X15s can be chained together, and each one of them with 4 channels, making up for a total of 16 channels.
Checklist before merging