D28127: Add some new battery sensors : energy_now, energy_full and power_now.

2020-04-14 Thread Nathaniel Graham
This revision was automatically updated to reflect the committed changes. Closed by commit R106:4c6c5638ef15: Add some new battery sensors : energy_now, energy_full and power_now. (authored by jjorge, committed by ngraham). REPOSITORY R106 KSysguard CHANGES SINCE LAST UPDATE

D28127: Add some new battery sensors : energy_now, energy_full and power_now.

2020-04-14 Thread Nathaniel Graham
ngraham added a comment. I've landed this for you. Keep up the great work! REPOSITORY R106 KSysguard REVISION DETAIL https://phabricator.kde.org/D28127 To: jjorge, #plasma, davidedmundson, ahiemstra Cc: ngraham, anthonyfieroni, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev,

D28127: Add some new battery sensors : energy_now, energy_full and power_now.

2020-04-14 Thread José JORGE
jjorge added a comment. In D28127#647747 , @ahiemstra wrote: > Seems fine to me now. You didn't have a developer account right? Yes, I don't. REPOSITORY R106 KSysguard BRANCH acpi-energy REVISION DETAIL

D28127: Add some new battery sensors : energy_now, energy_full and power_now.

2020-04-14 Thread Arjen Hiemstra
ahiemstra accepted this revision. ahiemstra added a comment. This revision is now accepted and ready to land. Seems fine to me now. You didn't have a developer account right? REPOSITORY R106 KSysguard BRANCH acpi-energy REVISION DETAIL https://phabricator.kde.org/D28127 To: jjorge,

D28127: Add some new battery sensors : energy_now, energy_full and power_now.

2020-04-14 Thread José JORGE
jjorge added a comment. I have finished my corrections. Is it nice now? Thanks. REPOSITORY R106 KSysguard REVISION DETAIL https://phabricator.kde.org/D28127 To: jjorge, #plasma, davidedmundson, ahiemstra Cc: anthonyfieroni, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack,

D28127: Add some new battery sensors : energy_now, energy_full and power_now.

2020-04-08 Thread José JORGE
jjorge updated this revision to Diff 79665. jjorge added a comment. - A better cast to float REPOSITORY R106 KSysguard CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D28127?vs=79655=79665 BRANCH acpi-energy REVISION DETAIL https://phabricator.kde.org/D28127 AFFECTED FILES

D28127: Add some new battery sensors : energy_now, energy_full and power_now.

2020-04-08 Thread José JORGE
jjorge updated this revision to Diff 79655. jjorge added a comment. I should learn to better use arc... - typo REPOSITORY R106 KSysguard CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D28127?vs=79653=79655 BRANCH acpi-energy REVISION DETAIL

D28127: Add some new battery sensors : energy_now, energy_full and power_now.

2020-04-08 Thread José JORGE
jjorge updated this revision to Diff 79653. jjorge added a comment. - Oops fix bad named functions REPOSITORY R106 KSysguard CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D28127?vs=79629=79653 BRANCH acpi-energy REVISION DETAIL https://phabricator.kde.org/D28127 AFFECTED

D28127: Add some new battery sensors : energy_now, energy_full and power_now.

2020-04-08 Thread Anthony Fieroni
anthonyfieroni added inline comments. INLINE COMMENTS > acpi.c:147 > if ( maximum > 0) { > -state = charge * 100 / maximum; > +state = charge/(float)(maximum/100);/* to get 0.1% changes */ > } `(float)(var_int/var_int)` does not what you want, it should be

D28127: Add some new battery sensors : energy_now, energy_full and power_now.

2020-04-08 Thread José JORGE
jjorge added a comment. Hem, you are right, I missed it because I was testing old binary. REPOSITORY R106 KSysguard REVISION DETAIL https://phabricator.kde.org/D28127 To: jjorge, #plasma, davidedmundson, ahiemstra Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh,

D28127: Add some new battery sensors : energy_now, energy_full and power_now.

2020-04-08 Thread José JORGE
jjorge updated this revision to Diff 79629. jjorge added a comment. - fix pointer REPOSITORY R106 KSysguard CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D28127?vs=79321=79629 BRANCH acpi-energy REVISION DETAIL https://phabricator.kde.org/D28127 AFFECTED FILES

D28127: Add some new battery sensors : energy_now, energy_full and power_now.

2020-04-06 Thread Arjen Hiemstra
ahiemstra added inline comments. INLINE COMMENTS > acpi.c:73 > > -void registerBatteryRate(int number, struct SensorModul *sm) > +void registerBatteryEnergy(char name, int number, struct SensorModul *sm) > { Uhm, this should be `const char *name` right? I don't really see how this can work

D28127: Add some new battery sensors : energy_now, energy_full and power_now.

2020-04-04 Thread José JORGE
jjorge updated this revision to Diff 79321. jjorge added a comment. - Follow ahiemstra suggestions : - cast to float directly - move 2 repeated lines to initAcpiBattery REPOSITORY R106 KSysguard CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D28127?vs=77923=79321 BRANCH

D28127: Add some new battery sensors : energy_now, energy_full and power_now.

2020-04-01 Thread Arjen Hiemstra
ahiemstra added a comment. Good stuff. Just two small comments. Additionally, you may be interested in https://phabricator.kde.org/D28333 , which will eventually replace ksysguardd and has a better API for sensors. INLINE COMMENTS > acpi.c:82 > +char name[ ACPIFILENAMELENGTHMAX ];

D28127: Add some new battery sensors : energy_now, energy_full and power_now.

2020-03-18 Thread José JORGE
jjorge created this revision. Herald added a project: Plasma. Herald added a subscriber: plasma-devel. jjorge requested review of this revision. REVISION SUMMARY Depending on hardware, Linux kernel exports battery state in different files. Previously only charge_now, charge_full and