-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
INA3221 fix display multiple devices and add more options #21262
Conversation
fix display multiple devices and add more options
Thanks, looks nice. One naive question (I don't own the device), why is |
thanks for your commendation :-) .... I added it ( INA3221_SUPPLY_SIDE) as new feature so the driver is compatible to te former version - once you defined it you can choose in the command "sensor100" (by putting positive or negativ values for the shuntresistor) per channel whitch side of the shunt the busvoltage is measured / calculated. |
So shouldn't it be enabled by default (which is not the case here)? What's the harm if you always enable it? |
Your second Question .... if you have a powersupply and a load - the shuntvoltage is the difference between the two voltages. With this feature enabled you can choose which voltage shoud be considered independent of the current (= voltagedrop on the shunt) flowing. That also concerns the determined power and energy .... it is the power supplied by the powersupply or the power consumed by the load. |
ok I see no harm - exept al little mor code. We for shure can set the define by default. But the behavior of the driver is different as I also put the activation of the busvoltage in this option. That means the driver always or never scans and shows the voltage - independent of the definition of the according shuntresistor which then influences only the scan of the current |
Ok, I'll let you to your judgment if it's better to enable by default. Think of legacy but also future users. Please tell me and I merge right after |
I have no feeling if it produces complaints if we provide a driver with incompatibel behavior to the existing ? If we set it by default one can't reset it in the user_config_override.h .... so I can set it by default and see what happens .... what do you think ? |
another idea is to put the #define INA3221_SUPPLY_SIDE in the user_config_override.h - and extend the documentation at least of sensor100 - where else ? |
Yes, please do so |
Ok .... so you can merge the driver (as it is - we then have legacy behavior) and I'll extend the dokumentation. I did not do that till now - where should I start to read how to ? |
Thanks for seeing the typo. ok ... to have the feature by default was what we (s-hadinger and me) decided in the discussion ( see arendst#21262) But no problem - so we have it as comment in the my_user_config.h Waht do you mean with "not implemeted in the driver" ?
I'm very un happy that the name of this PR do not included a reference to the INA3221 driver which prevented me to have a deeper look before it is merged I'll will still have a look |
Driver fails to compile when linking. |
fix display multiple devices and add more options
fix display multiple devices and add more options
Description:
optimised code to save about 500 byte and used it for additional options
Related issue (if applicable): fixes #
Checklist:
NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass