Age | Commit message (Collapse) | Author |
|
* Fixed segfault when no clock is available.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
When there is no clock available, we even register the display ops.
The 'enter' callbakc is set but not data is available int the row
private data which leads to a segfaults.
This patch fix this problem by not registering the ops if the pm
subsystem was not correctly initialized.
In the meantime, we have to erase the window when we are switching
from one window to another. We can say it is the "default" display
callback.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reported-by: Milo (Woogyom) Kim <woogyom.kim@gmail.com>
|
|
- added tree algorithm
- a lot of code cleanup
- rewrote the clock code
- rewrote the display code
- rewrote the regulator code
- rewrote the sensor code
- rewrote the search code for a clock
- added sensor to display
- added a mainloop
- made the different pm block code consistent to each other
- removed most of global variables
- fixed https://bugs.launchpad.net/linaro-powerdebug/+bug/794725
- fixed https://bugs.launchpad.net/linaro-powerdebug/+bug/794726
- fixed https://bugs.launchpad.net/linaro-powerdebug/+bug/794728
- fixed https://bugs.launchpad.net/linaro-powerdebug/+bug/794731
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
That prevents to have the selections to collide between the search
list result and the main window.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
With this patch the content of the debugfs file is readen only when the
'refresh' button is hit and at the init of powerdebug.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
and add a 'find' ops.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Splitting the header and the footer will help to display a new footer
like the search string.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Switch the keyboard callback when we switch to the find mode.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
The maxx and maxy variables are already global functions defined in
the ncurses library. They are accessible through the getmaxyx macro.
Is it not needed to add two more global variables to our code, let's
use the code ncurses gives to us.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Remove the 'print' wrapper which inverts the screen coordinate.
This is opposite to the ncurses function convention and may lead
to wrong code.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
We don't need a window per pm block, just a main window refreshed at
the right moment is needed.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Use the mainloop we added in the previous patch.
Some reorg is needed with the functions, they are moved up and down
to prevent forward declarations.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Add a mainloop code with registering of the callbacks and co.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Make some functions static as they are no longer out of the scope of
the display code.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
The less we have define for pm blocks the easier is to add more pm blocks.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
The keystroke callback could be moved to the display code.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Make some cleanup around the headers.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
We can use a switch here to check the key which was stroke.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Remove unused parameter for the keystroke callback.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
We don't have anymore a specific case for each pm block as we use
some ops now.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Let's create some ops to be registered by the pm blocks to the display.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Remove the old "findparent" code.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Remove the specific cases in the mainloop and encapsulate the
display functions.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Remove some corner cases for the footer display we have the same
display feature for all the pm blocks.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Add the sensor display.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Create a pad for each pm blocks, so we can use the same code
to scroll the values on the display.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Use the tree to build a sensor tree and make the code consistent
with the other pm blocks.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Make the code consistent with the clocks and use the tree to
build the regulators.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
That allows to keep track of the different selections from the different
windows.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
This patch provides a function returning all the node of the tree
matching the substring passed a parameter.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
... needed at least for gdb ...
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|